142件ヒット
[1-100件を表示]
(0.052秒)
種類
- インスタンスメソッド (87)
- 定数 (44)
- 文書 (11)
クラス
- ERB (11)
-
IRB
:: Frame (11) - Method (11)
- Module (11)
- Tracer (11)
- UnboundMethod (21)
モジュール
- Etc (44)
-
Fiddle
:: Importer (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
SC
_ 2 _ FORT _ RUN (11) -
SC
_ 2 _ PBS _ ACCOUNTING (11) -
SC
_ THREAD _ SAFE _ FUNCTIONS (11) -
SC
_ XOPEN _ UNIX (11) -
bind
_ call (10) -
instance
_ method (11) - run (11)
-
trace
_ func (22) - unbind (11)
検索結果
先頭5件
-
UnboundMethod
# bind(obj) -> Method (24231.0) -
self を obj にバインドした Method オブジェクトを生成して返します。
...rror objがbindできないオブジェクトである場合に発生します
//emlist[例][ruby]{
# クラスのインスタンスメソッドの UnboundMethod の場合
class Foo
def foo
"foo"
end
end
# UnboundMethod `m' を生成
p m = Foo.instance_method(:foo) # => #<UnboundMethod: Fo......生成
p m.bind(Foo.new) # => #<Method: Foo#foo>
# Foo のサブクラス Bar のインスタンスをレシーバとする Method
class Bar < Foo
end
p m.bind(Bar.new) # => #<Method: Bar(Foo)#foo>
# モジュールのインスタンスメソッドの UnboundMethod の......"foo"
end
end
# UnboundMethod `m' を生成
p m = Foo.instance_method(:foo) # => #<UnboundMethod: Foo#foo>
# Foo をインクルードしたクラス Bar のインスタンスをレシーバと
# する Method オブジェクトを生成
class Bar
include Foo
end
p m.bind(Bar.new)... -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (18325.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...ます。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"......size_t", "unsigned long"
extern "int qsort(void*, size_t, size_t, void*)"
bind("int compare(void*, void*)"){|px, py|
x = px.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")
x <=> y
}
end
data = [32, 180001, -13, -1, 0, 49].......pack("i!*")
M.qsort(Fiddle::Pointer[data], 6, Fiddle::SIZEOF_INT, M["compare"])
p data.unpack("i!*") # => [-13, -1, 0, 32, 49, 180001]... -
Method
# unbind -> UnboundMethod (12506.0) -
self のレシーバとの関連を取り除いた UnboundMethod オブ ジェクトを生成して返します。
...関連を取り除いた UnboundMethod オブ
ジェクトを生成して返します。
//emlist[例][ruby]{
class Foo
def foo
"foo"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
unbound_method = m.unbind # => #<UnboundMethod: Foo#foo>
unbound_method.bind(Foo.new) # => #<Method... -
UnboundMethod
# bind _ call(recv , *args) -> object (12236.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
UnboundMethod
# bind _ call(recv , *args) { . . . } -> object (12236.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
IRB
:: Frame # trace _ func(event , file , line , id , binding) -> Binding (6400.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
ERB
# run(b=TOPLEVEL _ BINDING) -> nil (6300.0) -
ERB を b の binding で実行し、結果を標準出力へ印字します。
...ERB を b の binding で実行し、結果を標準出力へ印字します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
erb.run
# test foo
# test bar
//}... -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (6300.0) -
@todo
@todo -
Etc
:: SC _ 2 _ FORT _ RUN -> Integer (3201.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。 -
Etc
:: SC _ 2 _ PBS _ ACCOUNTING -> Integer (3201.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。 -
Etc
:: SC _ THREAD _ SAFE _ FUNCTIONS -> Integer (3201.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。