Class: Smartgen::Renderer::ERB
- Inherits:
-
Object
- Object
- Smartgen::Renderer::ERB
- Defined in:
- lib/smartgen/renderers/erb.rb
Overview
A renderer that uses ERB to render markup files.
Instance Method Summary collapse
-
#render(layout, markup_file, metadata = Smartgen::ObjectHash.new) ⇒ Object
Renders the markup file using the given layout.
Instance Method Details
#render(layout, markup_file, metadata = Smartgen::ObjectHash.new) ⇒ Object
Renders the markup file using the given layout.
It exposes markup_file
variable and its metadata
to the ERB layout.
8 9 10 |
# File 'lib/smartgen/renderers/erb.rb', line 8 def render(layout, markup_file, =Smartgen::ObjectHash.new) ::ERB.new(layout).result(binding) end |