Class: RablTemplate
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- RablTemplate
- Defined in:
- lib/rabl/template.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(context_scope, locals, &block) ⇒ Object
13 14 15 16 |
# File 'lib/rabl/template.rb', line 13 def evaluate(context_scope, locals, &block) = @options.merge(:source_location => file) ::Rabl::Engine.new(data, ).apply(context_scope, locals, &block).render end |
#initialize_engine ⇒ Object
4 5 6 7 |
# File 'lib/rabl/template.rb', line 4 def initialize_engine return if defined?(::Rabl) require_template_library 'rabl' end |
#prepare ⇒ Object
9 10 11 |
# File 'lib/rabl/template.rb', line 9 def prepare #left empty so each invocation has a new hash of options and new rabl engine for thread safety end |