Class: Malt::Engine::Coffee
- Defined in:
- lib/malt/engines/coffee.rb
Overview
Coffee Malt Engine
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
-
#render(params = {}, &content) ⇒ Object
Render coffee script to JavaScript.
Methods inherited from Abstract
#cache?, #create_engine, default, #initialize, #prepare_engine, register, type
Constructor Details
This class inherits a constructor from Malt::Engine::Abstract
Instance Method Details
#render(params = {}, &content) ⇒ Object
Render coffee script to JavaScript.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/malt/engines/coffee.rb', line 12 def render(params={}, &content) into, text, file = parameters(params, :to, :text, :file) case into when :javascript, :js, nil ::CoffeeScript.compile(text, (params)) else super(params, &content) end end |