Class: Padrino::Rendering::SlimOutputBuffer

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

Instance Method Summary collapse

Instance Method Details

#call(exp) ⇒ Object



6
7
8
# File 'padrino-helpers/lib/padrino/rendering/slim_template.rb', line 6

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

#concat(str) ⇒ Object



14
15
16
# File 'padrino-helpers/lib/padrino/rendering/slim_template.rb', line 14

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

#create_bufferObject



10
11
12
# File 'padrino-helpers/lib/padrino/rendering/slim_template.rb', line 10

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