Class: GovukComponent::Accordion
- Includes:
- ViewComponent::Slotable
- Defined in:
- app/components/govuk_component/accordion.rb
Defined Under Namespace
Classes: Section
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Attributes included from Traits::CustomHtmlAttributes
Instance Method Summary collapse
-
#initialize(id: nil, classes: [], html_attributes: {}) ⇒ Accordion
constructor
A new instance of Accordion.
Methods inherited from Base
Methods included from Traits::CustomClasses
Constructor Details
#initialize(id: nil, classes: [], html_attributes: {}) ⇒ Accordion
Returns a new instance of Accordion.
9 10 11 12 13 |
# File 'app/components/govuk_component/accordion.rb', line 9 def initialize(id: nil, classes: [], html_attributes: {}) super(classes: classes, html_attributes: html_attributes) @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'app/components/govuk_component/accordion.rb', line 7 def id @id end |