Module: Nyara::View::Haml

Defined in:
lib/nyara/view_handlers/haml.rb

Class Method Summary collapse

Class Method Details

.src(template) ⇒ Object


6
7
8
9
10
11
12
13
14
# File 'lib/nyara/view_handlers/haml.rb', line 6

def self.src template
  e = ::Haml::Engine.new template
  # todo trim mode
  <<-RUBY
_hamlout = ::Haml::Buffer.new(nil, encoding: 'utf-8'); _hamlout.buffer = @_nyara_view.out
#{e.precompiled}
_hamlout.buffer.join
RUBY
end