Class: Hanami::View::Rendering::Template Private
- Inherits:
-
Object
- Object
- Hanami::View::Rendering::Template
- Defined in:
- lib/hanami/view/rendering/template.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Rendering template
It’s used when a template wants to render another template.
Instance Method Summary collapse
-
#initialize(view, options) ⇒ Template
constructor
private
Initialize a template.
-
#render ⇒ String
private
Render the template.
Constructor Details
#initialize(view, options) ⇒ Template
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize a template
31 32 33 |
# File 'lib/hanami/view/rendering/template.rb', line 31 def initialize(view, ) @view, @options = view, end |
Instance Method Details
#render ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Render the template.
43 44 45 |
# File 'lib/hanami/view/rendering/template.rb', line 43 def render (template or raise_missing_template_error).render(scope) end |