Class: Bs5::ExpandableList::GroupItemHeader::TitleComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/bs5/expandable_list/group_item_header/title_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = expanded
end

Instance Attribute Details

#is_expandedObject (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
  @is_expanded
end

#target_idObject (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