Class: Bs5::ExpandableList::GroupItemHeader::TitleComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Bs5::ExpandableList::GroupItemHeader::TitleComponent
- Defined in:
- app/components/bs5/expandable_list/group_item_header/title_component.rb
Instance Attribute Summary collapse
-
#is_expanded ⇒ Object
(also: #expanded?)
readonly
Returns the value of attribute is_expanded.
-
#target_id ⇒ Object
readonly
Returns the value of attribute target_id.
Instance Method Summary collapse
-
#initialize(target_id:, expanded: false) ⇒ TitleComponent
constructor
A new instance of TitleComponent.
Constructor Details
#initialize(target_id:, expanded: false) ⇒ TitleComponent
Returns a new instance of TitleComponent.
12 13 14 15 |
# File 'app/components/bs5/expandable_list/group_item_header/title_component.rb', line 12 def initialize(target_id:, expanded: false) @target_id = target_id @is_expanded = end |
Instance Attribute Details
#is_expanded ⇒ Object (readonly) Also known as: expanded?
Returns the value of attribute is_expanded.
10 11 12 |
# File 'app/components/bs5/expandable_list/group_item_header/title_component.rb', line 10 def @is_expanded end |
#target_id ⇒ Object (readonly)
Returns the value of attribute target_id.
10 11 12 |
# File 'app/components/bs5/expandable_list/group_item_header/title_component.rb', line 10 def target_id @target_id end |