Module: Innate::View::Haml

Defined in:
lib/flustered/extensions.rb

Class Method Summary collapse

Class Method Details

.call(action, string) ⇒ Object

Shamelessly excerpted from Ramaze.



11
12
13
14
15
16
17
# File 'lib/flustered/extensions.rb', line 11

def self.call(action, string)
  haml = View.compile(string) do |s| 
    ::Haml::Engine.new(s, action.options) 
  end
  html = haml.to_html(action.instance, action.variables)
  return html, 'text/html'
end