Class: StaticMatic::TemplateHandlers::Haml

Inherits:
ActionView::TemplateHandler
  • Object
show all
Includes:
ActionView::TemplateHandlers::Compilable
Defined in:
lib/staticmatic/template_handlers/haml.rb

Instance Method Summary collapse

Instance Method Details

#compile(template, local_assigns = {}) ⇒ Object



9
10
11
12
13
14
# File 'lib/staticmatic/template_handlers/haml.rb', line 9

def compile(template, local_assigns = {})
  options = StaticMatic::Config[:haml_options].dup
  options[:filename] = template.filename

  ::Haml::Engine.new(template.source, options).send(:precompiled_with_ambles, [])
end