Class: Bootstrap::ViewHelpers::Components::Accordion
- Inherits:
-
Bootstrap::ViewHelpers::Component
- Object
- Bootstrap::ViewHelpers::Component
- Bootstrap::ViewHelpers::Components::Accordion
- Defined in:
- lib/bootstrap/view_helpers/components/accordion.rb,
lib/bootstrap/view_helpers/components/accordion/card.rb,
lib/bootstrap/view_helpers/components/accordion/button.rb
Defined Under Namespace
Instance Attribute Summary
Attributes inherited from Bootstrap::ViewHelpers::Component
#block, #options, #style, #view
Instance Method Summary collapse
Methods inherited from Bootstrap::ViewHelpers::Component
Constructor Details
This class inherits a constructor from Bootstrap::ViewHelpers::Component
Instance Method Details
#group(title, options = {}, &block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/bootstrap/view_helpers/components/accordion.rb', line 16 def group(title, = {}, &block) [:title] = title [:body] = true [:parent] = accordion_id Card.new(view, , &block).to_html end |
#to_html ⇒ Object
10 11 12 13 14 |
# File 'lib/bootstrap/view_helpers/components/accordion.rb', line 10 def to_html content_tag(:div, .merge({ id: accordion_id })) do block.call(self) end end |