Module: Armadillo
- Defined in:
- lib/armadillo.rb
Defined Under Namespace
Classes: TemplateContext
Constant Summary collapse
- VERSION =
"0.0.6"- DEFAULT_OPTIONS =
{ :default_encoding => Encoding.default_external, :outvar => "@_output" }
Class Method Summary collapse
-
.render(template_path, locals = {}, options = {}) ⇒ String
Render the erb template.
Class Method Details
.render(template_path, locals = {}, options = {}) ⇒ String
Note:
options also accepts any options offered by the Erubis templating system.
Render the erb template.
144 145 146 147 148 |
# File 'lib/armadillo.rb', line 144 def self.render(template_path, locals = {}, = {}) scope = .fetch(:scope) { Object.new } context = TemplateContext.new(scope, ) _render(template_path, locals, context, ) end |