Class: Essence::ExpandableToggleComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Essence::ExpandableToggleComponent
- Defined in:
- app/components/essence/expandable_toggle_component.rb
Constant Summary collapse
- DEFAULT_TARGET =
'.expandable'
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Attribute Summary collapse
-
#expand_all_text ⇒ Object
readonly
Returns the value of attribute expand_all_text.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
Instance Method Summary collapse
-
#initialize(target: DEFAULT_TARGET, expand_all_text: nil, collapse_all_text: nil, **html_options) ⇒ ExpandableToggleComponent
constructor
A new instance of ExpandableToggleComponent.
Methods inherited from ApplicationComponent
Methods included from Utils
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #integer_or_fallback
Constructor Details
#initialize(target: DEFAULT_TARGET, expand_all_text: nil, collapse_all_text: nil, **html_options) ⇒ ExpandableToggleComponent
Returns a new instance of ExpandableToggleComponent.
9 10 11 12 13 14 15 16 17 |
# File 'app/components/essence/expandable_toggle_component.rb', line 9 def initialize(target: DEFAULT_TARGET, expand_all_text: nil, collapse_all_text: nil, **) @target = target @expand_all_text = @collapse_all_text = collapse_all_text @html_options = end |
Instance Attribute Details
#expand_all_text ⇒ Object (readonly)
Returns the value of attribute expand_all_text.
5 6 7 |
# File 'app/components/essence/expandable_toggle_component.rb', line 5 def @expand_all_text end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
5 6 7 |
# File 'app/components/essence/expandable_toggle_component.rb', line 5 def @html_options end |