Class: GovukComponent::Tabs

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

Defined Under Namespace

Classes: Tab

Instance Attribute Summary collapse

Attributes included from GovukComponent::Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods inherited from Base

wrap_slot

Methods included from GovukComponent::Traits::CustomClasses

#classes

Constructor Details

#initialize(title:, classes: [], html_attributes: {}) ⇒ Tabs

Returns a new instance of Tabs.



9
10
11
12
13
# File 'app/components/govuk_component/tabs.rb', line 9

def initialize(title:, classes: [], html_attributes: {})
  super(classes: classes, html_attributes: html_attributes)

  self.title = title
end

Instance Attribute Details

#titleObject

Returns the value of attribute title.



4
5
6
# File 'app/components/govuk_component/tabs.rb', line 4

def title
  @title
end