Class: Hanami::Extensions::View::SliceConfiguredPart
- Inherits:
-
Module
- Object
- Module
- Hanami::Extensions::View::SliceConfiguredPart
- Defined in:
- lib/hanami/extensions/view/slice_configured_part.rb
Overview
Provides slice-specific configuration and behavior for any view part class defined within a slice’s module namespace.
Instance Attribute Summary collapse
- #slice ⇒ Object readonly
Instance Method Summary collapse
- #extended(klass) ⇒ Object private
-
#initialize(slice) ⇒ SliceConfiguredPart
constructor
private
A new instance of SliceConfiguredPart.
- #inspect ⇒ String
Constructor Details
#initialize(slice) ⇒ SliceConfiguredPart
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.
Returns a new instance of SliceConfiguredPart.
16 17 18 19 |
# File 'lib/hanami/extensions/view/slice_configured_part.rb', line 16 def initialize(slice) super() @slice = slice end |
Instance Attribute Details
#slice ⇒ Object (readonly)
12 13 14 |
# File 'lib/hanami/extensions/view/slice_configured_part.rb', line 12 def slice @slice end |
Instance Method Details
#extended(klass) ⇒ 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.
23 24 25 |
# File 'lib/hanami/extensions/view/slice_configured_part.rb', line 23 def extended(klass) define_new end |
#inspect ⇒ String
31 32 33 |
# File 'lib/hanami/extensions/view/slice_configured_part.rb', line 31 def inspect "#<#{self.class.name}[#{slice.name}]>" end |