るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.115秒)

別のキーワード

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

ライブラリ

検索結果

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