るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.180秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:l[x] > バージョン:2.7.0[x] > クエリ:p[x] > クエリ:v[x] > クラス:ERB[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

キーワード

検索結果

ERB#set_eoutvar(compiler, eoutvar = '_erbout') -> Array (19207.0)

ERBの中でeRubyスクリプトの出力をためていく変数を設定します。

...
ERB
の中でeRubyスクリプトの出力をためていく変数を設定します。

ERB
でeRubyスクリプトの出力をためていく変数を設定するために使用します。
この設定は ERB#new でも行えるため、通常はそちらを使用した方がより容易です。...

ERB#result(b=TOPLEVEL_BINDING) -> String (18907.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 (907.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
//}...