Class: Soy::Renderer
- Inherits:
-
Object
- Object
- Soy::Renderer
- Defined in:
- lib/soy/renderer.rb
Overview
Runs the template through ERB and generates HTML from it, within optional layout.
Instance Method Summary collapse
-
#initialize(template, layout) ⇒ Renderer
constructor
template,
Soy::Fileinstance layout,Soy::Fileinstance. - #render ⇒ Object
Constructor Details
Instance Method Details
#render ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/soy/renderer.rb', line 19 def render out = _render(@template) out = convert_template(out) out = _render(@layout) { out } out = out.gsub(/^\s+$/, "") out.gsub(/\A\n/, "") end |