Class: Bs5::ExpandableListGroupComponent

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

Constant Summary collapse

DEFAULT_TAG_NAME =
:div

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ExpandableListGroupComponent

Returns a new instance of ExpandableListGroupComponent.



14
15
16
17
18
19
20
# File 'app/components/bs5/expandable_list_group_component.rb', line 14

def initialize(options = {})
  @accordion = options.delete(:accordion)
  @stretchable = options.delete(:stretchable)
  @id = options.delete(:id)
  @tag_name = options.delete(:tag) || DEFAULT_TAG_NAME
  @options = options
end

Instance Attribute Details

#accordionObject (readonly) Also known as: accordion?

Returns the value of attribute accordion.



10
11
12
# File 'app/components/bs5/expandable_list_group_component.rb', line 10

def accordion
  @accordion
end

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'app/components/bs5/expandable_list_group_component.rb', line 10

def options
  @options
end

#stretchableObject (readonly) Also known as: stretchable?

Returns the value of attribute stretchable.



10
11
12
# File 'app/components/bs5/expandable_list_group_component.rb', line 10

def stretchable
  @stretchable
end

#tag_nameObject (readonly)

Returns the value of attribute tag_name.



10
11
12
# File 'app/components/bs5/expandable_list_group_component.rb', line 10

def tag_name
  @tag_name
end