Module: Hanami::Layout::ClassMethods
- Defined in:
- lib/hanami/layout.rb
Overview
Class level API
Constant Summary collapse
- SUFFIX =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Template name suffix
'_layout'.freeze
Instance Method Summary collapse
-
#registry ⇒ Object
private
A registry that holds all the registered layouts.
-
#suffix ⇒ Object
private
Template name suffix.
-
#template ⇒ Object
private
Template name.
Instance Method Details
#registry ⇒ Object
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.
A registry that holds all the registered layouts.
60 61 62 |
# File 'lib/hanami/layout.rb', line 60 def registry @registry ||= View::Rendering::LayoutRegistry.new(self) end |
#suffix ⇒ Object
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.
Template name suffix
91 92 93 |
# File 'lib/hanami/layout.rb', line 91 def suffix SUFFIX end |
#template ⇒ Object
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.
Template name
ApplicationLayout.template # => ‘application’
80 81 82 |
# File 'lib/hanami/layout.rb', line 80 def template super.sub(suffix, '') end |