Class: Bs5::ExpandableListItemComponent

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

Constant Summary collapse

DEFAULT_WRAPPER_TAG =
:div

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ExpandableListItemComponent

Returns a new instance of ExpandableListItemComponent.



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

def initialize(options = {})
  @parent_id = options.delete(:parent_id)
  @stretchable = options.delete(:stretchable)
  @wrapper_html = options.delete(:wrapper_html)
  @options = options
end

Instance Attribute Details

#parent_idObject (readonly)

Returns the value of attribute parent_id.



12
13
14
# File 'app/components/bs5/expandable_list_item_component.rb', line 12

def parent_id
  @parent_id
end

#stretchableObject (readonly) Also known as: stretchable?

Returns the value of attribute stretchable.



12
13
14
# File 'app/components/bs5/expandable_list_item_component.rb', line 12

def stretchable
  @stretchable
end

#wrapper_htmlObject (readonly)

Returns the value of attribute wrapper_html.



12
13
14
# File 'app/components/bs5/expandable_list_item_component.rb', line 12

def wrapper_html
  @wrapper_html
end