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
Attributes included from GovukComponent::Traits::CustomHtmlAttributes
Instance Method Summary collapse
-
#initialize(title:, id: nil, classes: [], html_attributes: {}) ⇒ TabComponent
constructor
A new instance of TabComponent.
Methods included from GovukComponent::Traits::CustomClasses
Methods included from Govuk::Components::Helpers::CssUtilities
Constructor Details
#initialize(title:, id: nil, classes: [], html_attributes: {}) ⇒ TabComponent
Returns a new instance of TabComponent.
6 7 8 9 10 11 |
# File 'app/components/govuk_component/tab_component.rb', line 6 def initialize(title:, id: nil, classes: [], html_attributes: {}) super(classes: classes, html_attributes: html_attributes) @title = title @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'app/components/govuk_component/tab_component.rb', line 4 def id @id end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'app/components/govuk_component/tab_component.rb', line 4 def title @title end |