6件ヒット
[1-6件を表示]
(0.098秒)
ライブラリ
- ビルトイン (3)
- fiddle (1)
-
fiddle
/ import (1) - ipaddr (1)
クラス
-
Fiddle
:: Pointer (1) -
File
:: Stat (1) - IPAddr (1)
- Integer (1)
- Module (1)
モジュール
-
Fiddle
:: Importer (1)
検索結果
先頭5件
-
Fiddle
:: Pointer # <=>(other) -> Integer (63622.0) -
ポインタの指すアドレスの大小を比較します。
ポインタの指すアドレスの大小を比較します。
other より小さい場合は -1, 等しい場合は 0、other より大きい場合は
1を返します。
@param other 比較対象の Pointer オブジェクト -
Integer
# <=>(other) -> -1 | 0 | 1 | nil (63412.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時
に-1、比較できない時に nil を返します。
@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか
//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=> '' # => nil
//} -
Module
# <=>(other) -> Integer | nil (54730.0) -
self と other の継承関係を比較します。
self と other の継承関係を比較します。
self と other を比較して、
self が other の子孫であるとき -1、
同一のクラス/モジュールのとき 0、
self が other の先祖であるとき 1
を返します。
継承関係にないクラス同士の比較では
nil を返します。
other がクラスやモジュールでなければ
nil を返します。
@param other 比較対象のクラスやモジュール
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
... -
File
:: Stat # <=>(o) -> Integer | nil (54676.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
ファイルの最終更新時刻を比較します。self が other よりも
新しければ正の数を、等しければ 0 を古ければ負の数を返します。
比較できない場合は nil を返します。
@param o File::Stat のインスタンスを指定します。
//emlist[][ruby]{
require 'tempfile' # for Tempfile
fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.n... -
IPAddr
# <=>(other) -> Integer | nil (54658.0) -
self と other を比較します。
self と other を比較します。
@param other 比較対象の IPAddr オブジェクト。
@return self と other のアドレスファミリが一致しない場合は nil を返します。
アドレスファミリが一致する場合は、両方の数値表現を Integer#<=>
で比較した結果を返します。
@see Integer#<=> -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (184.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
Ruby のブロックを C の関数で wrap し、その関数をモジュールに
インポートします。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートした関数を表す ...