Class: Frontman::Renderer
- Inherits:
-
Object
- Object
- Frontman::Renderer
show all
- Includes:
- Singleton
- Defined in:
- lib/frontman/renderers/renderer.rb
Instance Method Summary
collapse
Instance Method Details
#compile(_layout) ⇒ Object
10
11
12
|
# File 'lib/frontman/renderers/renderer.rb', line 10
def compile(_layout)
raise('Should be implemented in child classes')
end
|
#render(compiled, content, scope, data) ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/frontman/renderers/renderer.rb', line 14
def render(compiled, content, scope, data)
Frontman::App.instance.view_data.push(data)
content = render_content(compiled, content, scope, data)
Frontman::App.instance.view_data.pop
content
end
|
#render_content(_compiled, _content, _scope, _data) ⇒ Object
22
23
24
|
# File 'lib/frontman/renderers/renderer.rb', line 22
def render_content(_compiled, _content, _scope, _data)
raise('Should be implemented in child classes')
end
|