るりまサーチ

最速Rubyリファレンスマニュアル検索!
690件ヒット [201-300件を表示] (0.025秒)
トップページ > クエリ:binding[x]

別のキーワード

  1. _builtin binding
  2. proc binding
  3. binding eval
  4. kernel binding
  5. tracepoint binding

検索結果

<< < 1 2 3 4 5 ... > >>

ERB#run(b=TOPLEVEL_BINDING) -> nil (123.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.add_filter {|event, file, line, id, binding, klass| .... } (113.0)

トレース出力するかどうかを決定するフィルタを追加します。 何もフィルタを与えない場合はすべての行についてトレース情報が出力されます。 与えられた手続き(ブロックまたはProcオブジェクト)が真を返せば トレースは出力されます。

...します。
通常、true か falseを返す必要があります。

フィルタ手続きは引数として event, file, line, id, binding, klass の
6 つをとります。
Kernel.#set_trace_func で指定するものとほぼ同じです。

=== フィルタ手続きのパラメー...
...処理している行番号

: id
最後に呼び出されたメソッドのメソッド名(のシンボル)
そのようなメソッドがなければ0になる。

: binding
現在のコンテキスト

: klass
現在呼び出されているメソッドのクラスオブジェクト。...

IRB::Frame#bottom(n = 0) -> Binding (101.0)

下から n 番目のコンテキストを取り出します。

下から n 番目のコンテキストを取り出します。

@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
下位になります。

IRB::Frame#top(n = 0) -> Binding (101.0)

上から n 番目のコンテキストを取り出します。

上から n 番目のコンテキストを取り出します。

@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
上位になります。

IRB::Frame.bottom(n = 0) -> Binding (101.0)

下から n 番目のコンテキストを取り出します。

下から n 番目のコンテキストを取り出します。

@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
下位になります。

絞り込み条件を変える

IRB::Frame.top(n = 0) -> Binding (101.0)

上から n 番目のコンテキストを取り出します。

上から n 番目のコンテキストを取り出します。

@param n 取り出すコンテキストを Integer で指定します。n は 0 が最
上位になります。

Tracer#trace_func(event, file, line, id, binding, klass, *) -> object | nil (101.0)

@todo

@todo

Kernel.#set_trace_func(proc) -> Proc (72.0)

Ruby インタプリタのイベントをトレースする Proc オブジェクトとして 指定された proc を登録します。 nil を指定するとトレースがオフになります。

...

=== ブロックパラメータの意味

渡す Proc オブジェクトのパラメータは
//emlist[][ruby]{
proc{|event, file, line, id, binding, klass| "..." }
//}
で、意味は以下の通りです。

: event
実行のタイプを表す、以下のいずれかの文字列。
//emlist{...
...び出されたメソッドを表す Symbol オブジェクト。
トップレベルでは nil。
//}
: binding
実行中のプログラムのコンテキストを表す Binding オブジェクト。

: klass
event に応じ、以下のものが渡されます。
第四ブロック引数...
..., #<Binding:0xf6ceb8>, Kernel]
# ["line", "..", 4, nil, #<Binding:0x10cbcd8>, nil]
# ["c-call", "..", 4, :inherited, #<Binding:0x10cba98>, Class]
# ["c-return", "..", 4, :inherited, #<Binding:0x10cb858>, Class]
# ["class", "..", 4, nil, #<Binding:0x10cb600>, nil]
# ["end", "..", 5, nil, #<Binding:0x...

Thread#set_trace_func(pr) -> Proc | nil (72.0)

スレッドにトレース用ハンドラを設定します。

..., "example.rb", 2, nil, #<Binding:0x00007fc8de87cb08>, nil]
# => ["c-call", "example.rb", 2, :inherited, #<Binding:0x00007fc8de886770>, Class]
# => ["c-return", "example.rb", 2, :inherited, #<Binding:0x00007fc8de8844e8>, Class]
# => ["class", "example.rb", 2, nil, #<Binding:0x00007fc8de88e830>, nil]...
...["end", "example.rb", 3, nil, #<Binding:0x00007fc8de88d6b0>, nil]
# => ["line", "example.rb", 4, nil, #<Binding:0x00007fc8de88c440>, nil]
# => ["c-call", "example.rb", 4, :to_s, #<Binding:0x00007fc8de896f30>, Integer]
# => ["c-return", "example.rb", 4, :to_s, #<Binding:0x00007fc8de894a50>, Integer]...
...ample.rb", 5, nil, #<Binding:0x00007fc8de967b08>, nil]
# => ["c-call", "example.rb", 5, :current, #<Binding:0x00007fc8de967798>, Thread]
# => ["c-return", "example.rb", 5, :current, #<Binding:0x00007fc8de9673b0>, Thread]
# => ["c-call", "example.rb", 5, :set_trace_func, #<Binding:0x00007fc8de966fc8>...
<< < 1 2 3 4 5 ... > >>