Class: GovukComponent::Accordion

Inherits:
Base
  • Object
show all
Includes:
ViewComponent::Slotable
Defined in:
app/components/govuk_component/accordion.rb

Defined Under Namespace

Classes: Section

Instance Attribute Summary collapse

Attributes included from Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods inherited from Base

wrap_slot

Methods included from Traits::CustomClasses

#classes

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

#idObject

Returns the value of attribute id.



7
8
9
# File 'app/components/govuk_component/accordion.rb', line 7

def id
  @id
end