Class: ERB::FileOut

Inherits:
ERB
  • Object
show all
Defined in:
lib/erb/file_out.rb

Instance Method Summary collapse

Instance Method Details

#set_eoutvar(compiler, eoutvar = '_erbout') ⇒ Object



8
9
10
11
12
13
# File 'lib/erb/file_out.rb', line 8

def set_eoutvar(compiler, eoutvar = '_erbout')
  compiler.put_cmd = "#{eoutvar}.write"
  compiler.insert_cmd = "#{eoutvar}.write"
  compiler.pre_cmd = ["#{eoutvar} = Tempfile.create('_erbout', encoding: __ENCODING__)"]
  compiler.post_cmd = ["#{eoutvar}.close", "#{eoutvar}.path"]
end