るりまサーチ

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

別のキーワード

  1. kernel test
  2. _builtin test
  3. rubygems/test_utilities tempio
  4. rubygems/test_utilities fetcher=
  5. testtask test_files=

ライブラリ

クラス

検索結果

ERB#result(b=TOPLEVEL_BINDING) -> String (18156.0)

ERB を b の binding で実行し、結果の文字列を返します。

...を b の binding で実行し、結果の文字列を返します。

@param b eRubyスクリプトが実行されるときのbinding

//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test
1 = "foo"
test
2 = "bar"
puts erb.result
# test foo
# test bar
//}...
...し、結果の文字列を返します。

@param b eRubyスクリプトが実行されるときのbinding

//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test
1 = "foo"
test
2 = "bar"
puts erb.result
# test foo
# test bar
//}

@see ERB#result_with_hash...