るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.047秒)
トップページ > クエリ:v[x] > バージョン:2.6.0[x] > クエリ:TOPLEVEL_BINDING[x]

別のキーワード

  1. toplevel reset
  2. toplevel new
  3. toplevel full_name
  4. context toplevel
  5. toplevel file_stat

ライブラリ

クラス

キーワード

検索結果

Object::TOPLEVEL_BINDING -> Binding (72604.0)

トップレベルでの Binding オブジェクト。

トップレベルでの Binding オブジェクト。

詳細は Binding を参照してください。

ERB#result(b=TOPLEVEL_BINDING) -> String (604.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"
puts erb.result
# test foo
# test bar
//}

@see ERB#result_with_hash

ERB#run(b=TOPLEVEL_BINDING) -> nil (604.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
//}