るりまサーチ

最速Rubyリファレンスマニュアル検索!
77件ヒット [1-77件を表示] (0.105秒)
トップページ > クエリ:i[x] > クエリ:binding[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. _builtin i
  5. matrix i

ライブラリ

クラス

キーワード

検索結果

Tracer.add_filter {|event, file, line, id, binding, klass| .... } (6314.0)

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

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

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

=== フィルタ手続きのパラ...
...出力での表記。

//emlist{
* line (-) ある行を実行
* call (>) メソッド呼び出し
* return (<) メソッドからのリターン
* class (C) クラスコンテキストに入った
* end (E) クラスコンテキストから出た
* raise 例外が発生し...
...ッドからreturn
//}

: file
現在処理しているファイルの名前

: line
現在処理している行番号

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

: binding
現在のコンテキ...

Tracer.add_filter(proc) (6114.0)

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

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

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

=== フィルタ手続きのパラ...
...出力での表記。

//emlist{
* line (-) ある行を実行
* call (>) メソッド呼び出し
* return (<) メソッドからのリターン
* class (C) クラスコンテキストに入った
* end (E) クラスコンテキストから出た
* raise 例外が発生し...
...ッドからreturn
//}

: file
現在処理しているファイルの名前

: line
現在処理している行番号

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

: binding
現在のコンテキ...

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

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

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

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

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

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

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

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

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (3107.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...:InstructionSequence オブジェクトを作成して返します。

@param body Proc、Method オブジェクトを指定します。

例1:irb で実行した場合

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_bin...
...ding@(irb)>

# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/iseq_of.rb
def hello
puts "hello, world"
end

$a_global_...
...' + 'b' }

# irb
> require '/tmp/iseq_of.rb'

# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>

# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x0...

絞り込み条件を変える

ERB.new(str, safe_level=NOT_GIVEN, trim_mode=NOT_GIVEN, eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: &#39;_erbout&#39;) -> ERB (307.0)

eRubyスクリプト から ERB オブジェクトを生成して返します。

...

@param str eRubyスクリプトを表す文字列
@param safe_level eRubyスクリプトが実行されるときのセーフレベル
@param trim_mode 整形の挙動を変更するオプション

@param eoutvar eRubyスクリプトの中で出力をためていく変数の名前を表す文...
...fe_level, trim_mode, eoutvar の指定は非推奨です。
Ruby 3.2 で削除されました。
trim_mode と eoutvar の指定はキーワード引数に移行してください。

//emlist[例][ruby]{
require "erb"

# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",...
...ell messages pattie, breaded and fried.",
:cost => 9.95 }

attr_reader :product, :price

def initialize( product = "", price = "" )
@product = product
@price = price
end

def build
b = binding
# create and run templates, filling member data variables
ERB.new...

ERB.new(str, safe_level=nil, trim_mode=nil, eoutvar=&#39;_erbout&#39;) -> ERB (207.0)

eRubyスクリプト から ERB オブジェクトを生成して返します。

...

@param str eRubyスクリプトを表す文字列
@param safe_level eRubyスクリプトが実行されるときのセーフレベル
@param trim_mode 整形の挙動を変更するオプション

@param eoutvar eRubyスクリプトの中で出力をためていく変数の名前を表す文...
...fe_level, trim_mode, eoutvar の指定は非推奨です。
Ruby 3.2 で削除されました。
trim_mode と eoutvar の指定はキーワード引数に移行してください。

//emlist[例][ruby]{
require "erb"

# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",...
...ell messages pattie, breaded and fried.",
:cost => 9.95 }

attr_reader :product, :price

def initialize( product = "", price = "" )
@product = product
@price = price
end

def build
b = binding
# create and run templates, filling member data variables
ERB.new...

XMP.new(bind = nil) -> XMP (119.0)

自身を初期化します。

...します。

@param bind Binding オブジェクトを指定します。省略した場合は、最
後に実行した XMP#puts、Kernel#xmp の
Binding
を使用します。まだ何も実行していない場合は
Object::TOPLEVEL_BINDING を使用します。...

ERB.new(str, trim_mode: nil, eoutvar: &#39;_erbout&#39;) -> ERB (107.0)

eRubyスクリプト から ERB オブジェクトを生成して返します。

...eRubyスクリプト から ERB オブジェクトを生成して返します。

@param str eRubyスクリプトを表す文字列
@param trim_mode 整形の挙動を変更するオプション

@param eoutvar eRubyスクリプトの中で出力をためていく変数の名前を表す文...
...


//emlist[例][ruby]{
require "erb"

# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messages pattie, breaded and fried.",
:cost => 9.95 }

attr_reader :product, :price

def initialize( product = "", price = "" )...
...t
@price = price
end

def build
b = binding
# create and run templates, filling member data variables
ERB.new(<<~'END_PRODUCT', eoutvar: "@product").result b
<%= PRODUCT[:name] %>
<%= PRODUCT[:desc] %>
END_PRODUCT
ERB.new(<<~'END_PRICE', eoutvar: "@price").res...