Class: Hanami::Extensions::View::SliceConfiguredView
- Inherits:
-
Module
- Object
- Module
- Hanami::Extensions::View::SliceConfiguredView
- Defined in:
- lib/hanami/extensions/view/slice_configured_view.rb
Overview
Provides slice-specific configuration and behavior for any view class defined within a slice’s module namespace.
Constant Summary collapse
- TEMPLATES_DIR =
"templates"
- VIEWS_DIR =
"views"
- PARTS_DIR =
"parts"
- SCOPES_DIR =
"scopes"
Instance Attribute Summary collapse
- #slice ⇒ Object readonly
Instance Method Summary collapse
- #extended(view_class) ⇒ Object private
-
#initialize(slice) ⇒ SliceConfiguredView
constructor
private
A new instance of SliceConfiguredView.
- #inspect ⇒ String
Constructor Details
#initialize(slice) ⇒ SliceConfiguredView
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 SliceConfiguredView.
21 22 23 24 |
# File 'lib/hanami/extensions/view/slice_configured_view.rb', line 21 def initialize(slice) super() @slice = slice end |
Instance Attribute Details
#slice ⇒ Object (readonly)
17 18 19 |
# File 'lib/hanami/extensions/view/slice_configured_view.rb', line 17 def slice @slice end |
Instance Method Details
#extended(view_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.
28 29 30 31 32 |
# File 'lib/hanami/extensions/view/slice_configured_view.rb', line 28 def extended(view_class) load_app_view configure_view(view_class) define_inherited end |
#inspect ⇒ String
38 39 40 |
# File 'lib/hanami/extensions/view/slice_configured_view.rb', line 38 def inspect "#<#{self.class.name}[#{slice.name}]>" end |