Class: Tilt::MustacheTemplate
- Inherits:
-
Template
- Object
- Template
- Tilt::MustacheTemplate
- Defined in:
- lib/awestruct/handlers/template/mustache.rb
Class Method Summary collapse
Instance Method Summary collapse
- #allows_script? ⇒ Boolean
- #evaluate(scope, locals, &block) ⇒ Object
- #initialize_engine ⇒ Object
- #prepare ⇒ Object
Class Method Details
.engine_initialized? ⇒ Boolean
6 7 8 |
# File 'lib/awestruct/handlers/template/mustache.rb', line 6 def self.engine_initialized? defined? ::Mustache end |
Instance Method Details
#allows_script? ⇒ Boolean
21 22 23 |
# File 'lib/awestruct/handlers/template/mustache.rb', line 21 def allows_script? false end |
#evaluate(scope, locals, &block) ⇒ Object
17 18 19 |
# File 'lib/awestruct/handlers/template/mustache.rb', line 17 def evaluate(scope, locals, &block) @output ||= Mustache.render(data, scope) end |
#initialize_engine ⇒ Object
10 11 12 |
# File 'lib/awestruct/handlers/template/mustache.rb', line 10 def initialize_engine require_template_library 'mustache' end |
#prepare ⇒ Object
14 15 |
# File 'lib/awestruct/handlers/template/mustache.rb', line 14 def prepare end |