るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
15件ヒット [1-15件を表示] (0.141秒)

別のキーワード

  1. kernel $-l
  2. _builtin $-l
  3. matrix l
  4. lupdecomposition l
  5. l matrix

ライブラリ

クラス

モジュール

検索結果

Module#constants(inherit = true) -> [Symbol] (63787.0)

そのモジュール(またはクラス)で定義されている定数名の配列を返します。

そのモジュール(またはクラス)で定義されている定数名の配列を返します。

inherit に真を指定すると
スーパークラスやインクルードしているモジュールの定数も含みます。
Object のサブクラスの場合、Objectやそのスーパークラスで定義されている
定数は含まれません。 Object.constants とすると Object クラスで定義された
定数の配列が得られます。

得られる定数の順序は保証されません。

@param inherit true を指定するとスーパークラスや include したモジュールで
定義された定数が対象にはなります。false を指定し...

Module#class_variables(inherit = true) -> [Symbol] (27340.0)

クラス/モジュールに定義されているクラス変数の名前の配列を返します。

クラス/モジュールに定義されているクラス変数の名前の配列を返します。

@param inherit false を指定しない場合はスーパークラスやインクルードして
いるモジュールのクラス変数を含みます。

//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variables # => [:@@var2, :@@var1]
Two.class_va...

Kernel#convertible_int(type, headers = nil, opts = nil) (18352.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (18352.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

File#flock(operation) -> 0 | false (18340.0)

ファイルをロックします。

ファイルをロックします。

ロックを取得するまでブロックされます。
ロックの取得に成功した場合は 0 を返します。
File::LOCK_NB (ノンブロッキング) を指定すると、本来ならブロックされる場合に
ブロックされずに false を返すようになります。

@param operation ロックに対する操作の種類を示す定数を指定します。
どのような定数が利用可能かは以下を参照して下さい。

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX operation に不正な整数を与えた...

絞り込み条件を変える

Object#instance_variables -> [Symbol] (18340.0)

オブジェクトのインスタンス変数名をシンボルの配列として返します。

オブジェクトのインスタンス変数名をシンボルの配列として返します。

//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p obj.instance_variables

#=> [:@foo, :@bar]
//}

@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#class_variabl...

Socket#connect_nonblock(server_sockaddr) -> 0 (18322.0)

ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。

ソケットをノンブロッキングモードに設定した後、
connect(2) を呼び出します。

引数、返り値は Socket#connect と同じです。

connect が EINPROGRESS エラーを報告した場合、その例外(Errno::EINPROGRESS)
には IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライするために使うことができます。

# Pull down Google's web page
require 'socket'
include Socket::Constants
...

Socket::AncillaryData#unix_rights -> [IO] | nil (9322.0)

Unix domain socket の SCM_RIGHTS 制御メッセージに含まれる ファイルディスクリプタを IO オブジェクトの配列として返します。

Unix domain socket の SCM_RIGHTS 制御メッセージに含まれる
ファイルディスクリプタを IO オブジェクトの配列として返します。

得られる IO オブジェクトか IO か Socket です。

この配列は Socket::AncillaryData が初期化されたときに
作られます。例えば BasicSocket#recvmsg を :scm_rights => true
オプションを付けて呼びだし、
SCM_RIGHTS な 制御メッセージを受け取ったときに配列が作られます。
適切なオプションを指定しなかった場合は配列は生成されず、
このメソッドは nil...

Socket::AncillaryData#timestamp -> Time (9112.0)

タイムスタンプ制御メッセージに含まれる時刻を Time オブジェクト で返します。

タイムスタンプ制御メッセージに含まれる時刻を Time オブジェクト
で返します。

"タイムスタンプ制御メッセージ" は以下のいずれかです。
* SOL_SOCKET/SCM_TIMESTAMP (micro second) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
* SOL_SOCKET/SCM_TIMESTAMPNS (nano second) GNU/Linux
* SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD

require 'socket...

File#path -> String (9022.0)

オープン時に使用したパスを文字列で返します。

オープン時に使用したパスを文字列で返します。

パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。

@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f...

絞り込み条件を変える

File#to_path -> String (9022.0)

オープン時に使用したパスを文字列で返します。

オープン時に使用したパスを文字列で返します。

パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。

@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f...

Socket::AncillaryData#ip_pktinfo -> [Addrinfo, Integer, Addrinfo] (9022.0)

自身の type が IP_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス、ローカルアドレス) を3要素の配列で返します。

自身の type が IP_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス、ローカルアドレス)
を3要素の配列で返します。

IP_PKTINFO は非標準的拡張であり、システムによっては使えない場合があります。

require 'socket'

addr = Addrinfo.ip("127.0.0.1")
ifindex = 0
spec_dest = Addrinfo.ip("127.0.0.1")
ancdata = Socket::AncillaryData.ip_pktinfo(addr, ifindex, spe...

Socket::AncillaryData#ipv6_pktinfo -> [Addrinfo, Integer] (9022.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) を2要素の配列で返します。

自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
を2要素の配列で返します。

IPV6_PKTINFO については 3542 を参照してください。

require 'socket'

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo #=> [#<Addrinfo: ::1>, 0]

@see Socke...

Socket::AncillaryData#ipv6_pktinfo_addr -> Addrinfo (9022.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) のアドレスを返します。

自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
のアドレスを返します。

require 'socket'

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo_addr #=> #<Addrinfo: ::1>

@see Socket::AncillaryData.ipv6_pktinfo,
S...

Socket::AncillaryData#ipv6_pktinfo_ifindex -> Integer (9022.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) のインデックスを返します。

自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
のインデックスを返します。

require 'socket'

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo_ifindex #=> 0

@see Socket::AncillaryData.ipv6_pktinfo,
Socket::Anc...

絞り込み条件を変える