Class: Ui::Accordion::Component::Item
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Ui::Accordion::Component::Item
- Defined in:
- lib/uikit_rails/templates/components/accordion/component.rb
Instance Attribute Summary collapse
-
#html_attrs ⇒ Object
readonly
Returns the value of attribute html_attrs.
-
#open ⇒ Object
readonly
Returns the value of attribute open.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(title:, open: false, **html_attrs) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(title:, open: false, **html_attrs) ⇒ Item
Returns a new instance of Item.
22 23 24 25 26 27 |
# File 'lib/uikit_rails/templates/components/accordion/component.rb', line 22 def initialize(title:, open: false, **html_attrs) @title = title @open = open @html_attrs = html_attrs super() end |
Instance Attribute Details
#html_attrs ⇒ Object (readonly)
Returns the value of attribute html_attrs.
20 21 22 |
# File 'lib/uikit_rails/templates/components/accordion/component.rb', line 20 def html_attrs @html_attrs end |
#open ⇒ Object (readonly)
Returns the value of attribute open.
20 21 22 |
# File 'lib/uikit_rails/templates/components/accordion/component.rb', line 20 def open @open end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
20 21 22 |
# File 'lib/uikit_rails/templates/components/accordion/component.rb', line 20 def title @title end |
Instance Method Details
#call ⇒ Object
29 30 31 |
# File 'lib/uikit_rails/templates/components/accordion/component.rb', line 29 def call content end |