Class: Padrino::Rendering::HamlitOutputBuffer

Inherits:
Temple::Generators::StringBuffer
  • Object
show all
Defined in:
lib/padrino/rendering/hamlit_template.rb

Instance Method Summary collapse

Instance Method Details

#call(exp) ⇒ Object



6
7
8
# File 'lib/padrino/rendering/hamlit_template.rb', line 6

def call(exp)
  [preamble, compile(exp), postamble].flatten.compact.join('; '.freeze)
end

#concat(str) ⇒ Object



14
15
16
# File 'lib/padrino/rendering/hamlit_template.rb', line 14

def concat(str)
  "#{buffer}.safe_concat((#{str}))"
end

#create_bufferObject



10
11
12
# File 'lib/padrino/rendering/hamlit_template.rb', line 10

def create_buffer
  "#{buffer} = #{options[:buffer_class]}.new"
end