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