Class: Frontman::ErbRenderer
- Defined in:
- lib/frontman/renderers/erb_renderer.rb
Instance Method Summary collapse
Methods inherited from Renderer
Instance Method Details
#compile(layout) ⇒ Object
9 10 11 |
# File 'lib/frontman/renderers/erb_renderer.rb', line 9 def compile(layout) Erubis::Eruby.new(layout, bufvar: '@_erbout') end |
#render_content(compiled, content, scope, data) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/frontman/renderers/erb_renderer.rb', line 13 def render_content(compiled, content, scope, data) data.each do |key, value| scope.singleton_class.send(:define_method, key) { value } end compiled.result(scope.get_binding { content }) end |