Module: Hamlbars::Ext::Precompiler
- Included in:
- Template
- Defined in:
- lib/hamlbars/ext/precompiler.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#evaluate_with_precompiler(scope, locals, &block) ⇒ Object
Takes the rendered template and compiles it using the Handlebars compiler via ExecJS.
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/hamlbars/ext/precompiler.rb', line 7 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#evaluate_with_precompiler(scope, locals, &block) ⇒ Object
Takes the rendered template and compiles it using the Handlebars compiler via ExecJS.
13 14 15 16 17 18 19 |
# File 'lib/hamlbars/ext/precompiler.rb', line 13 def evaluate_with_precompiler(scope, locals, &block) if self.class.precompiler_enabled? precompile { evaluate_without_precompiler(scope,locals,&block) } else evaluate_without_precompiler(scope,locals,&block) end end |