Class: Ui::Accordion::Component::Item

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/uikit_rails/templates/components/accordion/component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_attrsObject (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

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

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

#callObject



29
30
31
# File 'lib/uikit_rails/templates/components/accordion/component.rb', line 29

def call
  content
end