Class: PrecompiledHaml::Plugin
- Inherits:
-
Haml::Plugin
- Object
- Haml::Plugin
- PrecompiledHaml::Plugin
- Defined in:
- lib/precompiled_haml/plugin.rb
Instance Method Summary collapse
Instance Method Details
#compile(template) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/precompiled_haml/plugin.rb', line 3 def compile(template) = Haml::Template..dup if (ActionPack::VERSION::MAJOR >= 4) && template.respond_to?(:type) [:mime_type] = template.type elsif template.respond_to? :mime_type [:mime_type] = template.mime_type end [:filename] = template.identifier PrecompiledHaml::Engine.new(template.source, ).compiler.precompiled_with_ambles([]) end |