Class: Hanami::Extensions::View::SliceConfiguredContext Private
- Inherits:
-
Module
- Object
- Module
- Hanami::Extensions::View::SliceConfiguredContext
- Defined in:
- lib/hanami/extensions/view/slice_configured_context.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.
Provides slice-specific configuration and behavior for any view context class defined within a slice’s module namespace.
Instance Attribute Summary collapse
- #slice ⇒ Object readonly private
Instance Method Summary collapse
- #extended(_context_class) ⇒ Object private
-
#initialize(slice) ⇒ SliceConfiguredContext
constructor
private
A new instance of SliceConfiguredContext.
- #inspect ⇒ Object private
Constructor Details
#initialize(slice) ⇒ SliceConfiguredContext
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 SliceConfiguredContext.
16 17 18 19 |
# File 'lib/hanami/extensions/view/slice_configured_context.rb', line 16 def initialize(slice) super() @slice = slice end |
Instance Attribute Details
#slice ⇒ Object (readonly)
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.
14 15 16 |
# File 'lib/hanami/extensions/view/slice_configured_context.rb', line 14 def slice @slice end |
Instance Method Details
#extended(_context_class) ⇒ 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.
21 22 23 |
# File 'lib/hanami/extensions/view/slice_configured_context.rb', line 21 def extended(_context_class) define_new end |
#inspect ⇒ 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.
25 26 27 |
# File 'lib/hanami/extensions/view/slice_configured_context.rb', line 25 def inspect "#<#{self.class.name}[#{slice.name}]>" end |