Class: Padrino::Rendering::SafeERB

Inherits:
ERB
  • Object
show all
Defined in:
padrino-helpers/lib/padrino/rendering/erb_template.rb

Instance Method Summary collapse

Instance Method Details

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



4
5
6
7
8
9
# File 'padrino-helpers/lib/padrino/rendering/erb_template.rb', line 4

def set_eoutvar(compiler, eoutvar = '_erbout')
  compiler.put_cmd = "#{eoutvar}.safe_concat"
  compiler.insert_cmd = "#{eoutvar}.concat"
  compiler.pre_cmd = ["#{eoutvar} = ActiveSupport::SafeBuffer.new"]
  compiler.post_cmd = ["#{eoutvar}.force_encoding(__ENCODING__)"]
end