236件ヒット
[1-100件を表示]
(0.027秒)
別のキーワード
種類
- インスタンスメソッド (128)
- 定数 (48)
- モジュール関数 (24)
- 関数 (24)
- 文書 (12)
キーワード
- === (6)
-
SC
_ JOB _ CONTROL (12) -
SC
_ SHARED _ MEMORY _ OBJECTS (12) -
SC
_ TYPED _ MEMORY _ OBJECTS (12) -
TOPLEVEL
_ BINDING (12) - [] (6)
-
bind
_ call (12) - call (12)
- eval (36)
- irb (9)
-
local
_ variable _ get (12) -
local
_ variable _ set (12) -
method
_ unbind (12) - receiver (11)
-
ruby 1
. 6 feature (12) -
trace
_ func (12) -
umethod
_ unbind (12)
検索結果
先頭5件
-
UnboundMethod
# bind(obj) -> Method (18231.0) -
self を obj にバインドした Method オブジェクトを生成して返します。
...self を obj にバインドした Method オブジェクトを生成して返します。
@param obj 自身をバインドしたいオブジェクトを指定します。ただしバインドできるのは、
生成元のクラスかそのサブクラスのインスタンスのみで......す。
@raise TypeError objがbindできないオブジェクトである場合に発生します
//emlist[例][ruby]{
# クラスのインスタンスメソッドの UnboundMethod の場合
class Foo
def foo
"foo"
end
end
# UnboundMethod `m' を生成
p m = Foo.instance_method(:foo) # =>......スをレシーバとする Method オブジェクトを生成
p m.bind(Foo.new) # => #<Method: Foo#foo>
# Foo のサブクラス Bar のインスタンスをレシーバとする Method
class Bar < Foo
end
p m.bind(Bar.new) # => #<Method: Bar(Foo)#foo>
# モジュー... -
Addrinfo
# bind {|sock| . . . } -> object (18208.0) -
自身のアドレスにバインドされたソケットを作成します。
...がメソッドの返り値となります。
ブロックを省略した場合は、生成された Socket
オブジェクトが返されます。
require 'socket'
Addrinfo.udp("0.0.0.0", 9981).bind {|s|
s.local_address.connect {|s| s.send "hello", 0 }
p s.recv(10) #=> "hello"
}... -
Object
:: TOPLEVEL _ BINDING -> Binding (9200.0) -
トップレベルでの Binding オブジェクト。
...トップレベルでの Binding オブジェクト。
詳細は Binding を参照してください。... -
UnboundMethod
# bind _ call(recv , *args) -> object (6236.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 (6236.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... -
static VALUE method
_ unbind(VALUE obj) (6200.0) -
-
static VALUE umethod
_ unbind(VALUE obj) (6200.0) -
-
Binding
# local _ variable _ set(symbol , obj) (3130.0) -
引数 symbol で指定した名前のローカル変数に引数 obj を設定します。
...数 obj を設定します。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
@param obj 引数 symbol で指定したローカル変数に設定するオブジェクトを指定します。
//emlist[例][ruby]{
def foo
a = 1
bind = binding
bind.local_v......ariable_set(:a, 2) # set existing local variable `a'
bind.local_variable_set(:b, 3) # create new local variable `b'
# `b' exists only in binding
p bind.local_variable_get(:a) # => 2
p bind.local_variable_get(:b) # => 3
p a # => 2......# => NameError
end
//}
このメソッドは以下のコード(ただし、obj が Ruby のコードで出力される場
合)と同様の動作をします。
//emlist[][ruby]{
binding.eval("#{symbol} = #{obj}")
//}
@see Binding#local_variable_get, Binding#local_variable_defined?... -
Etc
:: SC _ JOB _ CONTROL -> Integer (3101.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。 -
Etc
:: SC _ SHARED _ MEMORY _ OBJECTS -> Integer (3101.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。