Class: Charming::Presentation::Templates::ResolvedTemplate
- Inherits:
-
Data
- Object
- Data
- Charming::Presentation::Templates::ResolvedTemplate
- Defined in:
- lib/charming/presentation/templates.rb
Overview
A resolved template: an on-disk path paired with the handler responsible for rendering it.
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#render(view) ⇒ Object
Renders the template against view by delegating to the registered handler.
Instance Attribute Details
#handler ⇒ Object (readonly)
Returns the value of attribute handler
11 12 13 |
# File 'lib/charming/presentation/templates.rb', line 11 def handler @handler end |
#path ⇒ Object (readonly)
Returns the value of attribute path
11 12 13 |
# File 'lib/charming/presentation/templates.rb', line 11 def path @path end |
Instance Method Details
#render(view) ⇒ Object
Renders the template against view by delegating to the registered handler.
13 14 15 |
# File 'lib/charming/presentation/templates.rb', line 13 def render(view) handler.render(path, view) end |