Class: GovukComponent::TableComponent::BodyComponent

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

Instance Attribute Summary

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, first_cell_is_header: false, classes: [], html_attributes: {}) ⇒ BodyComponent

Returns a new instance of BodyComponent.



4
5
6
7
8
# File 'app/components/govuk_component/table_component/body_component.rb', line 4

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

  build_rows_from_row_data(rows, first_cell_is_header)
end