Class: Expressr::Renderers::Haml

Inherits:
Base
  • Object
show all
Defined in:
lib/expressr/renderers/haml.rb

Instance Method Summary collapse

Methods inherited from Base

#add_extension

Instance Method Details

#render(view, locals = {}) ⇒ Object



6
7
8
9
10
# File 'lib/expressr/renderers/haml.rb', line 6

def render(view, locals={})
  view = add_extension(view, 'haml')
  content = File.read(view)
  ::Haml::Engine.new(content).render(nil, locals)
end