Class: GovukComponent::TableComponent::ColGroupComponent::ColComponent
- Inherits:
-
Base
- Object
- ViewComponent::Base
- Base
- GovukComponent::TableComponent::ColGroupComponent::ColComponent
- Defined in:
- app/components/govuk_component/table_component/col_group_component.rb
Instance Attribute Summary collapse
-
#span ⇒ Object
readonly
Returns the value of attribute span.
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(span: 1, classes: [], html_attributes: {}) ⇒ ColComponent
constructor
A new instance of ColComponent.
Methods inherited from Base
Constructor Details
#initialize(span: 1, classes: [], html_attributes: {}) ⇒ ColComponent
Returns a new instance of ColComponent.
29 30 31 32 33 |
# File 'app/components/govuk_component/table_component/col_group_component.rb', line 29 def initialize(span: 1, classes: [], html_attributes: {}) @span = span.to_s super(classes:, html_attributes:) end |
Instance Attribute Details
#span ⇒ Object (readonly)
Returns the value of attribute span.
27 28 29 |
# File 'app/components/govuk_component/table_component/col_group_component.rb', line 27 def span @span end |
Instance Method Details
#call ⇒ Object
35 36 37 |
# File 'app/components/govuk_component/table_component/col_group_component.rb', line 35 def call tag.col(span:, **html_attributes) end |