Class: Tilt::MustacheTemplate
- Inherits:
-
Template
- Object
- Template
- Tilt::MustacheTemplate
- Defined in:
- lib/tilt-mustache.rb
Overview
Instance Method Summary collapse
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
12 13 14 |
# File 'lib/tilt-mustache.rb', line 12 def evaluate(scope, locals, &block) Mustache.render(data, locals.merge(scope.is_a?(Hash) ? scope : {}).merge({:yield => block.nil? ? '' : block.call})) end |
#initialize_engine ⇒ Object
8 |
# File 'lib/tilt-mustache.rb', line 8 def initialize_engine; end |
#prepare ⇒ Object
10 |
# File 'lib/tilt-mustache.rb', line 10 def prepare; end |