Class: Hanami::Extensions::View::SliceConfiguredHelpers
- Inherits:
-
Module
- Object
- Module
- Hanami::Extensions::View::SliceConfiguredHelpers
- Defined in:
- lib/hanami/extensions/view/slice_configured_helpers.rb
Overview
Provides slice-specific helper methods for any view object requiring access to helpers.
Instance Attribute Summary collapse
- #slice ⇒ Object readonly
Instance Method Summary collapse
- #extended(klass) ⇒ Object private
-
#initialize(slice) ⇒ SliceConfiguredHelpers
constructor
private
A new instance of SliceConfiguredHelpers.
- #inspect ⇒ String
Constructor Details
#initialize(slice) ⇒ SliceConfiguredHelpers
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 SliceConfiguredHelpers.
15 16 17 18 |
# File 'lib/hanami/extensions/view/slice_configured_helpers.rb', line 15 def initialize(slice) super() @slice = slice end |
Instance Attribute Details
#slice ⇒ Object (readonly)
11 12 13 |
# File 'lib/hanami/extensions/view/slice_configured_helpers.rb', line 11 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.
22 23 24 |
# File 'lib/hanami/extensions/view/slice_configured_helpers.rb', line 22 def extended(klass) include_helpers(klass) end |
#inspect ⇒ String
30 31 32 |
# File 'lib/hanami/extensions/view/slice_configured_helpers.rb', line 30 def inspect "#<#{self.class.name}[#{slice.name}]>" end |