175件ヒット
[1-100件を表示]
(0.091秒)
ライブラリ
- ビルトイン (55)
- erb (24)
-
fiddle
/ import (12) -
irb
/ frame (12) - resolv-replace (12)
-
rubygems
/ specification (12) - socket (36)
- tracer (12)
クラス
- Binding (7)
- ERB (24)
-
Gem
:: Specification (12) -
IRB
:: Frame (12) - Method (12)
- Module (12)
- Tracer (12)
- UDPSocket (48)
- UnboundMethod (24)
モジュール
-
Fiddle
:: Importer (12)
キーワード
-
add
_ bindir (12) -
bind
_ call (12) - connect (12)
-
instance
_ method (12) -
recvfrom
_ nonblock (12) - result (12)
- run (12)
-
source
_ location (7) -
trace
_ func (24) - unbind (12)
検索結果
先頭5件
-
UnboundMethod
# bind(obj) -> Method (24132.0) -
self を obj にバインドした Method オブジェクトを生成して返します。
...Error objがbindできないオブジェクトである場合に発生します
//emlist[例][ruby]{
# クラスのインスタンスメソッドの UnboundMethod の場合
class Foo
def foo
"foo"
end
end
# UnboundMethod `m' を生成
p m = Foo.instance_method(:foo) # => #<UnboundMethod: F......bind(Foo.new) # => #<Method: Foo#foo>
# Foo のサブクラス Bar のインスタンスをレシーバとする Method
class Bar < Foo
end
p m.bind(Bar.new) # => #<Method: Bar(Foo)#foo>
# モジュールのインスタンスメソッドの UnboundMethod の場合
modu......"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)... -
UDPSocket
# bind(host , port) -> 0 (21136.0) -
ソケットを host の port に bind(2) します。
...ソケットを host の port に bind(2) します。
bind したポートから Socket#recv でデータを受け取ることができます。
@param host bind するホスト名文字列
@param port bind するポート番号... -
UDPSocket
# bind(host , port) -> Integer (21130.0) -
UDPSocket#bindのパラメータ host の名前解決に resolv ライブラリを使います。
...UDPSocket#bindのパラメータ host の名前解決に resolv
ライブラリを使います。
@param host bindするホスト名を文字列で指定します。
@param port bindするポートを指定します。
@raise SocketError 名前解決に失敗した場合に発生します。... -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (18208.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...Ruby のブロックを C の関数で wrap し、その関数をモジュールに
インポートします。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出す......きます。
signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートし......関数を表す Fiddle::Function オブジェクトを返します。
@param signature 関数の名前とシネグチャ
@param opts オプション
例
require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "libc.so.6"
typealias "size_t", "unsigned long"
extern "in... -
Method
# unbind -> UnboundMethod (12407.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 (12137.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 (12137.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... -
Binding
# source _ location -> [String , Integer] (9101.0) -
self の Ruby のソースファイル名と行番号を返します。
...self の Ruby のソースファイル名と行番号を返します。
d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。
//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}... -
IRB
:: Frame # trace _ func(event , file , line , id , binding) -> Binding (6301.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
ERB
# result(b=TOPLEVEL _ BINDING) -> String (6201.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"
puts erb.result
# test foo
# test bar
//......}
@see ERB#result_with_hash...