Class: GovukComponent::TableComponent::RowComponent
- Inherits:
-
Base
- Object
- ViewComponent::Base
- Base
- GovukComponent::TableComponent::RowComponent
- Defined in:
- app/components/govuk_component/table_component/row_component.rb
Instance Attribute Summary collapse
-
#first_cell_is_header ⇒ Object
readonly
Returns the value of attribute first_cell_is_header.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cell_data: nil, first_cell_is_header: false, header: false, classes: [], html_attributes: {}) ⇒ RowComponent
constructor
A new instance of RowComponent.
Constructor Details
#initialize(cell_data: nil, first_cell_is_header: false, header: false, classes: [], html_attributes: {}) ⇒ RowComponent
Returns a new instance of RowComponent.
6 7 8 9 10 11 12 13 |
# File 'app/components/govuk_component/table_component/row_component.rb', line 6 def initialize(cell_data: nil, first_cell_is_header: false, header: false, classes: [], html_attributes: {}) @header = header @first_cell_is_header = first_cell_is_header super(classes: classes, html_attributes: html_attributes) build_cells_from_cell_data(cell_data) end |
Instance Attribute Details
#first_cell_is_header ⇒ Object (readonly)
Returns the value of attribute first_cell_is_header.
4 5 6 |
# File 'app/components/govuk_component/table_component/row_component.rb', line 4 def first_cell_is_header @first_cell_is_header end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
4 5 6 |
# File 'app/components/govuk_component/table_component/row_component.rb', line 4 def header @header end |