464件ヒット
[101-200件を表示]
(0.091秒)
ライブラリ
- ビルトイン (146)
- e2mmap (6)
- erb (24)
-
fiddle
/ import (12) -
irb
/ frame (36) -
irb
/ xmp (12) - resolv-replace (12)
-
rubygems
/ installer (36) -
rubygems
/ specification (36) - socket (120)
- tracer (12)
- un (12)
クラス
- Addrinfo (24)
- Binding (86)
- ERB (24)
-
Gem
:: Installer (36) -
Gem
:: Specification (36) - IPSocket (12)
-
IRB
:: Frame (36) - Method (24)
- Proc (12)
- Socket (36)
-
Socket
:: AncillaryData (12) - TracePoint (12)
- Tracer (12)
- UDPSocket (48)
- UnboundMethod (12)
モジュール
- Exception2MessageMapper (6)
-
Fiddle
:: Importer (12) - Kernel (24)
キーワード
- === (6)
- [] (6)
- accept (12)
-
add
_ bindir (12) -
bind
_ call (12) - binding (24)
- 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)
- irb (9)
-
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (11) - receiver (11)
- recvfrom (24)
-
recvfrom
_ nonblock (12) - result (12)
- run (12)
-
source
_ location (7) - top (12)
-
trace
_ func (24) - xmp (12)
検索結果
先頭5件
-
Gem
:: Specification # bindir -> String (12201.0) -
実行ファイルを格納するディレクトリを返します。
実行ファイルを格納するディレクトリを返します。 -
Gem
:: Specification # bindir=(dir) (12201.0) -
実行ファイルを格納するディレクトリをセットします。
...実行ファイルを格納するディレクトリをセットします。
@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。... -
Proc
# binding -> Binding (9201.0) -
Proc オブジェクトが保持するコンテキストを Binding オブジェクトで返します。
...Proc オブジェクトが保持するコンテキストを
Binding オブジェクトで返します。
//emlist[例][ruby]{
def fred(param)
proc {}
end
sample_proc = fred(99)
eval("param", sample_proc.binding) # => 99
//}... -
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.ne......w(: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 を設定します。
...ます。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
@param obj 引数 symbol で指定したローカル変数に設定するオブジェクトを指定します。
//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.local_variable_get(:b) # => 3
p a # => 2
p b......# => NameError
end
//}
このメソッドは以下のコード(ただし、obj が Ruby のコードで出力される場
合)と同様の動作をします。
//emlist[][ruby]{
binding.eval("#{symbol} = #{obj}")
//}
@see Binding#local_variable_get, Binding#local_variable_defined?... -
Binding
# irb -> object (9101.0) -
REPLのセッションを開始します。
...REPLのセッションを開始します。
2.5.0 からは require 'irb' せずに直接 binding.irb を呼び出しても使えるようになりました。
@see irb... -
Binding
# local _ variable _ defined?(symbol) -> bool (9101.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
...れている場合に true を、
そうでない場合に false を返します。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # =>......false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("defined?(#{symbol}) == 'local-variable'")
//}
@see Binding#local_variable_get, Binding#local_variable_set... -
Binding
# local _ variable _ get(symbol) -> object (9101.0) -
引数 symbol で指定した名前のローカル変数に設定された値を返します。
...@param symbol ローカル変数名を Symbol オブジェクトで指定します。
@raise NameError 引数 symbol で指定したローカル変数が未定義の場合に発生します。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_get(:a) # => 1
binding.local_variable_g......et(:b) # => NameError
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("#{symbol}")
//}
@see Binding#local_variable_set, Binding#local_variable_defined?... -
Binding
# local _ variables -> [Symbol] (9101.0) -
ローカル変数の一覧を Symbol の配列で返します。
...カル変数の一覧を Symbol の配列で返します。
//emlist[例][ruby]{
def foo
a = 1
2.times do |n|
binding.local_variables #=> [:a, :n]
end
end
//}
このメソッドは以下のコードと同様の動作をします。
//emlist[][ruby]{
binding.eval("local_variables")
//}...