Class: AccordionComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- AccordionComponent
- Defined in:
- app/components/accordion_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**args) ⇒ AccordionComponent
constructor
A new instance of AccordionComponent.
Constructor Details
#initialize(**args) ⇒ AccordionComponent
Returns a new instance of AccordionComponent.
4 5 6 |
# File 'app/components/accordion_component.rb', line 4 def initialize(**args) @args = args.presence || {} end |
Instance Method Details
#call ⇒ Object
8 9 10 |
# File 'app/components/accordion_component.rb', line 8 def call content_tag(:div, content, data: , **@args) end |