Class: Hanami::View::Rendering::NullLayout Private
- Inherits:
-
Object
- Object
- Hanami::View::Rendering::NullLayout
- Defined in:
- lib/hanami/view/rendering/null_layout.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.
Null Object pattern for Layout. It’s used when a view doesn’t require a layout.
Instance Method Summary collapse
-
#initialize(scope, rendered) ⇒ NullLayout
constructor
private
Initialize a layout.
-
#render ⇒ String
private
Render the layout.
Constructor Details
#initialize(scope, rendered) ⇒ NullLayout
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 layout
33 34 35 |
# File 'lib/hanami/view/rendering/null_layout.rb', line 33 def initialize(scope, rendered) @rendered = rendered 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 layout
46 47 48 |
# File 'lib/hanami/view/rendering/null_layout.rb', line 46 def render @rendered end |