Class: Hanami::Extensions::View::PartHelpers Private
- Inherits:
-
Object
- Object
- Hanami::Extensions::View::PartHelpers
- Extended by:
- SliceConfigurable
- Includes:
- StandardHelpers
- Defined in:
- lib/hanami/extensions/view/part.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.
Standalone helpers class including both StandardHelpers as well as the user-defined helpers for the slice.
Used where helpers should be addressed via an intermediary object (i.e. in parts), rather than mixed into a class directly.
Constant Summary
Constants included from Helpers::AssetsHelper
Helpers::AssetsHelper::ABSOLUTE_URL_MATCHER, Helpers::AssetsHelper::CROSSORIGIN_ANONYMOUS, Helpers::AssetsHelper::DEFAULT_FAVICON, Helpers::AssetsHelper::FAVICON_MIME_TYPE, Helpers::AssetsHelper::FAVICON_REL, Helpers::AssetsHelper::JAVASCRIPT_EXT, Helpers::AssetsHelper::JAVASCRIPT_MIME_TYPE, Helpers::AssetsHelper::NEW_LINE_SEPARATOR, Helpers::AssetsHelper::QUERY_STRING_MATCHER, Helpers::AssetsHelper::STYLESHEET_EXT, Helpers::AssetsHelper::STYLESHEET_MIME_TYPE, Helpers::AssetsHelper::STYLESHEET_REL, Helpers::AssetsHelper::WILDCARD_EXT
Constants included from Helpers::FormHelper
Helpers::FormHelper::CSRF_TOKEN, Helpers::FormHelper::DEFAULT_CHARSET, Helpers::FormHelper::DEFAULT_METHOD
Instance Attribute Summary collapse
-
#_context ⇒ Hanami::View::Context
(also: #context)
readonly
Returns the context for the current view rendering.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(context:) ⇒ PartHelpers
constructor
private
A new instance of PartHelpers.
Methods included from SliceConfigurable
configure_for_slice, configured_for_slice?, configured_for_slices, extended
Methods included from Helpers::AssetsHelper
#asset_url, #audio_tag, #favicon_tag, #image_tag, #javascript_tag, #stylesheet_tag, #video_tag
Methods included from Helpers::FormHelper
#_form_csrf_token, #_form_for_params, #_form_for_values, #csrf_meta_tags, #form_for
Constructor Details
#initialize(context:) ⇒ PartHelpers
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 PartHelpers.
79 80 81 |
# File 'lib/hanami/extensions/view/part.rb', line 79 def initialize(context:) @_context = context end |
Instance Attribute Details
#_context ⇒ Hanami::View::Context (readonly) Also known as: context
Returns the context for the current view rendering.
71 72 73 |
# File 'lib/hanami/extensions/view/part.rb', line 71 def _context @_context end |
Class Method Details
.configure_for_slice(slice) ⇒ 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.
61 62 63 |
# File 'lib/hanami/extensions/view/part.rb', line 61 def self.configure_for_slice(slice) extend SliceConfiguredHelpers.new(slice) end |