453件ヒット
[101-200件を表示]
(0.152秒)
ライブラリ
- ビルトイン (147)
- e2mmap (6)
- erb (24)
-
fiddle
/ import (12) -
irb
/ frame (36) - resolv-replace (12)
-
rubygems
/ installer (36) -
rubygems
/ specification (36) - socket (120)
- tracer (12)
- un (12)
クラス
- Addrinfo (24)
- Binding (63)
- ERB (24)
-
Gem
:: Installer (36) -
Gem
:: Specification (36) - IPSocket (12)
-
IRB
:: Frame (36) - Method (36)
- Module (12)
- Socket (36)
-
Socket
:: AncillaryData (12) - TracePoint (12)
- Tracer (12)
- UDPSocket (48)
- UnboundMethod (24)
モジュール
- Exception2MessageMapper (6)
-
Fiddle
:: Importer (12) - Kernel (12)
キーワード
- === (6)
- [] (6)
- accept (12)
-
add
_ bindir (12) -
bind
_ call (12) - binding (12)
- bindir (12)
- bindir= (12)
- bottom (12)
- call (12)
- connect (12)
- eval (12)
-
generate
_ bin _ script (12) -
generate
_ bin _ symlink (12) -
generate
_ windows _ script (12) - httpd (12)
-
instance
_ method (12) - irb (9)
-
local
_ variable _ get (12) -
local
_ variable _ set (12) - receiver (11)
- recvfrom (24)
-
recvfrom
_ nonblock (12) - result (12)
- run (12)
-
source
_ location (7) - top (12)
-
trace
_ func (24) - unbind (12)
検索結果
先頭5件
-
UnboundMethod
# bind _ call(recv , *args) { . . . } -> object (9237.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... -
Method
# unbind -> UnboundMethod (9207.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: Foo#foo>
//}... -
Gem
:: Specification # add _ bindir(executables) -> Array | nil (9201.0) -
実行コマンドの格納場所を返します。
...実行コマンドの格納場所を返します。
@param executables 実行コマンド名を格納した配列を指定します。... -
Gem
:: Specification # bindir -> String (9201.0) -
実行ファイルを格納するディレクトリを返します。
実行ファイルを格納するディレクトリを返します。 -
TracePoint
# binding -> Binding (9201.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...発生したイベントによって生成された Binding オブジェクトを返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
TracePoint
# binding -> Binding | nil (9201.0) -
発生したイベントによって生成された Binding オブジェクトを返します。
...れた Binding オブジェクトを返します。
C で記述されたメソッドは binding を生成しないため、
:c_call および :c_return イベントに対しては nil を返すことに注意してください。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:......call) do |tp|
p tp.binding.local_variables # => [:ret]
end
trace.enable
foo 1
//}... -
Tracer
# trace _ func(event , file , line , id , binding , klass , *) -> object | nil (9201.0) -
@todo
...@todo... -
Binding
# local _ variable _ set(symbol , obj) (9131.0) -
引数 symbol で指定した名前のローカル変数に引数 obj を設定します。
.../emlist[例][ruby]{
def foo
a = 1
bind = binding
bind.local_variable_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.loca......l_variable_get(:b) # => 3
p a # => 2
p b # => NameError
end
//}
このメソッドは以下のコード(ただし、obj が Ruby のコードで出力される場
合)と同様の動作をします。
//emlist[][ruby]{
binding.eval("#{symb......ol} = #{obj}")
//}
@see Binding#local_variable_get, Binding#local_variable_defined?... -
Binding
# local _ variable _ get(symbol) -> object (9101.0) -
引数 symbol で指定した名前のローカル変数に設定された値を返します。
...。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_get(:a) # => 1
binding.local_variable_get(:b) # => NameError
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("#{symbol}")
//}
@see Binding#local_variable_set, Binding#local_var... -
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]
//}... -
Gem
:: Specification # bindir=(dir) (9101.0) -
実行ファイルを格納するディレクトリをセットします。
実行ファイルを格納するディレクトリをセットします。
@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。