るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

検索結果

Socket::AncillaryData#type -> Integer (54673.0)

自身が保持している cmsg type (種類) を返します。

自身が保持している cmsg type (種類) を返します。

require 'socket'

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").type
#=> 2

@see Socket::AncillaryData.new

WIN32OLE_TYPE#typekind -> Integer (27694.0)

selfの種類を示す値を取得します。

selfの種類を示す値を取得します。

値の意味については、WIN32OLE_TYPE#ole_typeを参照してください。

@return 型の種類を示す数値を返します。
@raise WIN32OLERuntimeError 型の種類(TYPEKIND)を取得できない場合に通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Word 14.0 Object Library', 'Documents')
p tobj.typekind # => 4

@see WIN32OLE_TYPE#ole_type

Kernel#convertible_int(type, headers = nil, opts = nil) (19288.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) { ... } (19288.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...

WIN32OLE_METHOD#return_vtype -> Integer (18622.0)

メソッドの返り値の型を示す数値を取得します。

メソッドの返り値の型を示す数値を取得します。

@return 返り値の型を示す数値(VARENUM)を返します。
@raise WIN32OLERuntimeError メソッドの型情報を取得できなかった場合に通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Application')
method = WIN32OLE_METHOD.new(tobj, 'Visible')
puts method.return_vtype # => 11

VARENUMの定義は、Platfo...

絞り込み条件を変える

Zlib::ZStream#data_type -> Integer (18607.0)

ストリームに入力されたデータの形式を推測します。 返り値は Zlib::BINARY, Zlib::ASCII, Zlib::UNKNOWN の いずれかです。

ストリームに入力されたデータの形式を推測します。
返り値は Zlib::BINARY, Zlib::ASCII, Zlib::UNKNOWN の
いずれかです。

Addrinfo#socktype -> Integer (18604.0)

ソケットタイプを整数で返します。

ソケットタイプを整数で返します。

require 'socket'

Addrinfo.tcp("localhost", 80).socktype == Socket::SOCK_STREAM #=> true

Fiddle::Closure#ctype -> Integer (18604.0)

返り値の型を返します。

返り値の型を返します。

WIN32OLE_VARIANT#vartype -> Integer (18604.0)

selfの型情報を取得します。

selfの型情報を取得します。

型情報は、WIN32OLE::VARIANTの定数値の組み合わせです。

obj = WIN32OLE_VARIANT.new("string")
obj.vartype # => 8 (WIN32OLE::VARIANT::VT_BSTR)
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.vartype # => 8209 (WIN32OLE::VARIANT::VT_ARRAY | VT_UI1)

WIN32OLE_METHOD#event_interface -> String | nil (18322.0)

メソッドがイベントの場合、イベントのインターフェイス名を取得します。

メソッドがイベントの場合、イベントのインターフェイス名を取得します。

@return メソッドがイベントであれば、イベントのインターフェイス名を返し
ます。イベントでなければnilを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
puts method.event_interface # => WorkbookEvents

絞り込み条件を変える

WIN32OLE_TYPE#helpcontext -> Integer | nil (9322.0)

この型に関連するヘルプファイルのトピックID(ヘルプコンテキスト)を取得 します。

この型に関連するヘルプファイルのトピックID(ヘルプコンテキスト)を取得
します。

@return 型に関連するヘルプコンテキストを整数で返します。ヘルプコンテキ
ストが登録されていない場合はnilを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
puts tobj.helpcontext # => 131185

WIN32OLE_TYPE#major_version -> Integer (9322.0)

型のメジャーバージョン番号を取得します。

型のメジャーバージョン番号を取得します。

@return 型のメジャーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError 型属性の読み取りに失敗すると通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Word 14.0 Object Library', 'Documents')
p tobj.major_version # => 8

WIN32OLE_TYPE#minor_version -> Integer (9322.0)

型のマイナーバージョン番号を取得します。

型のマイナーバージョン番号を取得します。

@return 型のマイナーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError 型属性の読み取りに失敗すると通知します。

tobj = WIN32OLE_TYPE.new('Microsoft Word 14.0 Object Library', 'Documents')
p tobj.minor_version # => 5

Net::IMAP::BodyTypeBasic#size -> Integer (9304.0)

ボディのサイズのオクテット数を返します。

ボディのサイズのオクテット数を返します。

Net::IMAP::BodyTypeMessage#lines -> Integer (9304.0)

ボディのテキストの行数を返します。

ボディのテキストの行数を返します。

絞り込み条件を変える

Net::IMAP::BodyTypeMessage#size -> Integer (9304.0)

ボディのサイズのオクテット数を返します。

ボディのサイズのオクテット数を返します。

Net::IMAP::BodyTypeText#lines -> Integer (9304.0)

ボディの行数を返します。

ボディの行数を返します。

Net::IMAP::BodyTypeText#size -> Integer (9304.0)

ボディのサイズのオクテット数を返します。

ボディのサイズのオクテット数を返します。

WIN32OLE_TYPELIB#major_version -> Integer (9304.0)

TypeLibのメジャーバージョン番号を取得します。

TypeLibのメジャーバージョン番号を取得します。

@return TypeLibのメジャーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.major_version # => 1

WIN32OLE_TYPELIB#minor_version -> Integer (9304.0)

TypeLibのマイナーバージョン番号を取得します。

TypeLibのマイナーバージョン番号を取得します。

@return TypeLibのマイナーバージョン番号を整数で返します。
@raise WIN32OLERuntimeError TypeLibの属性が読み取れない場合に通知します。

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts tlib.minor_version # => 7

絞り込み条件を変える

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (790.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (790.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Kernel#check_sizeof(type, headers = nil) -> Integer | nil (682.0)

与えられた型のサイズを返します。

与えられた型のサイズを返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require 'mkmf'
check_sizeof('mystruct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。

Kernel#check_sizeof(type, headers = nil) { ... } -> Integer | nil (682.0)

与えられた型のサイズを返します。

与えられた型のサイズを返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require 'mkmf'
check_sizeof('mystruct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。

Fiddle::Importer#create_value(type, val = nil) -> Fiddle::CStruct (430.0)

型が type で要素名が "value" であるような構造体を 定義(Fiddle::Importer#struct)し、 その構造体のメモリを Fiddle::CStruct#malloc で確保し、 確保したメモリを保持しているオブジェクトを返します。

型が type で要素名が "value" であるような構造体を
定義(Fiddle::Importer#struct)し、
その構造体のメモリを Fiddle::CStruct#malloc で確保し、
確保したメモリを保持しているオブジェクトを返します。

type は "int", "void*" といった文字列で型を指定します。
val に nil 以外を指定すると、確保された構造体に
その値を代入します。

@param type 型を表す文字列
@param val 構造体に確保される初期値


require 'fiddle/import'

module M
...

絞り込み条件を変える

Fiddle::Importer#value(type, val = nil) -> Fiddle::CStruct (430.0)

型が type で要素名が "value" であるような構造体を 定義(Fiddle::Importer#struct)し、 その構造体のメモリを Fiddle::CStruct#malloc で確保し、 確保したメモリを保持しているオブジェクトを返します。

型が type で要素名が "value" であるような構造体を
定義(Fiddle::Importer#struct)し、
その構造体のメモリを Fiddle::CStruct#malloc で確保し、
確保したメモリを保持しているオブジェクトを返します。

type は "int", "void*" といった文字列で型を指定します。
val に nil 以外を指定すると、確保された構造体に
その値を代入します。

@param type 型を表す文字列
@param val 構造体に確保される初期値


require 'fiddle/import'

module M
...

Socket::AncillaryData#ip_pktinfo -> [Addrinfo, Integer, Addrinfo] (370.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...

Net::FTP::MLSxEntry#facts -> { String => String|Integer|Time } (358.0)

そのエントリの「facts」を返します。

そのエントリの「facts」を返します。

facts とはそのエントリに関するファイルサイズなどの様々な情報です。
Net::FTP はこの情報を文字列をキーとするハッシュテーブルで
返します。
標準では以下のような facts が定義されています。これらの facts には
対応するメソッドが定義されています。すべてのサーバでこれら
の facts がすべて実装されているわけではありません。
3659 では
modify, perm, type, size, unique はすべてのサーバで
対応すべき(SHOULD)、とされています。


* "modify" : 変更時刻 (Ti...

Socket::AncillaryData#ipv6_pktinfo -> [Addrinfo, Integer] (352.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_ifindex -> Integer (352.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...

絞り込み条件を変える

BasicSocket#sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) -> Integer (340.0)

sendmsg(2) を用いてメッセージを送ります。

sendmsg(2) を用いてメッセージを送ります。

このメソッドはブロックします。ノンブロッキング方式で通信したい
場合は BasicSocket#sendmsg_nonblock を用います。

ソケットが connection-less の場合は dest_sockaddr で
通信先のアドレスを指定しなければなりません。Socket.sockaddr_in
の返り値や Addrinfo オブジェクトを引数として渡すことができます。

controls には 補助データ(ancillary data)を渡します。
Socket::AncillaryData のインスタンスや
3要素(c...

WIN32OLE_METHOD#dispid -> Integer (322.0)

メソッドのディスパッチID(DISPID)を取得します。

メソッドのディスパッチID(DISPID)を取得します。

ディスパッチIDはメソッドの一意識別子です。WIN32OLEでは、
WIN32OLE#_invokeなどのメソッドで、呼び出すサーバのメソッドを指定
するのに利用します。

@return メソッドのDISPIDを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.dispid # => 181
...

WIN32OLE_METHOD#helpcontext -> Integer | nil (322.0)

メソッドのヘルプコンテキストを取得します。

メソッドのヘルプコンテキストを取得します。

ヘルプコンテキストは、関連するヘルプファイル上のトピック位置を示す整数
値です。

@return ヘルプコンテキストを返します。未定義の場合はnilを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.helpcontext # => 65717

WIN32OLE_METHODオブジェクトを引数として、WI...

WIN32OLE_METHOD#invkind -> Integer (322.0)

メソッドの種類を示すINVOKEKIND列挙値を取得します。

メソッドの種類を示すINVOKEKIND列挙値を取得します。

ここで言うメソッドの種類というのは、OLEオートメーションクライアントの記
述言語がどのような形式でサーバ呼び出しを記述すべきかを指定した属性値で
す。

@return メソッドのINVOKEKINDを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.invkind # => 1

INVOKE...

WIN32OLE_METHOD#offset_vtbl -> Integer (322.0)

このメソッドのVTBLのオフセットを取得します。

このメソッドのVTBLのオフセットを取得します。

VTBLはC++やCでメソッドを呼び出すために利用する関数ポインタのテーブルです。

@return メソッドのVTBL上のオフセットを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.offset_vtbl # => 40

絞り込み条件を変える

WIN32OLE_METHOD#size_opt_params -> Integer | nil (322.0)

オプションパラメータ数を取得します。

オプションパラメータ数を取得します。

@return オプションパラメータ数を整数で返します。メソッドの詳細情報を取
得できない場合はnilを返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
puts method.size_opt_params # => 5

WIN32OLE_METHOD#size_params -> Integer | nil (322.0)

パラメータ数を取得します。

パラメータ数を取得します。

@return パラメータ数を整数で返します。メソッドの詳細情報を取得できない
場合はnilを返します。


tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
puts method.size_params # => 12

WIN32OLE_VARIABLE#varkind -> Integer (322.0)

変数の種類(VARKIND)を取得します。

変数の種類(VARKIND)を取得します。

この変数の種類を示す数値を返します。

@return VARKINDに対応する数値を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
puts tobj.variables.map {|v| v.varkind}.uniq # => 2

数値の意味については、WIN32OLE_VARIABLE#variable_kindの説明を参照してください。

RubyVM::InstructionSequence#to_a -> Array (58.0)

self の情報を 14 要素の配列にして返します。

self の情報を 14 要素の配列にして返します。

命令シーケンスを以下の情報で表します。

: magic

データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。

: major_version

命令シーケンスのメジャーバージョン。

: minor_version

命令シーケンスのマイナーバージョン。

: format_type

データフォーマットを示す数値。常に 1。

: misc

以下の要素から構成される Hash オブジェクト。

:arg_size: メソッド、ブ...