Class: GovukComponent::TableComponent::HeadComponent

Inherits:
Base
  • Object
show all
Defined in:
app/components/govuk_component/table_component/head_component.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#html_attributes

Attributes included from GovukComponent::Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods included from GovukComponent::Traits::CustomClasses

#classes

Methods included from Govuk::Components::Helpers::CssUtilities

#combine_classes

Constructor Details

#initialize(rows: nil, classes: [], html_attributes: {}) ⇒ HeadComponent

Returns a new instance of HeadComponent.



6
7
8
9
10
# File 'app/components/govuk_component/table_component/head_component.rb', line 6

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

  build_rows_from_row_data(rows)
end

Instance Attribute Details

#row_dataObject (readonly)

Returns the value of attribute row_data.



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

def row_data
  @row_data
end