Class: GovukComponent::SummaryListComponent::ValueComponent
- Inherits:
-
Base
- Object
- ViewComponent::Base
- Base
- GovukComponent::SummaryListComponent::ValueComponent
- Defined in:
- app/components/govuk_component/summary_list_component/value_component.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes inherited from Base
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(text: nil, classes: [], html_attributes: {}) ⇒ ValueComponent
constructor
A new instance of ValueComponent.
Methods inherited from Base
Constructor Details
#initialize(text: nil, classes: [], html_attributes: {}) ⇒ ValueComponent
Returns a new instance of ValueComponent.
4 5 6 7 8 |
# File 'app/components/govuk_component/summary_list_component/value_component.rb', line 4 def initialize(text: nil, classes: [], html_attributes: {}) super(classes:, html_attributes:) @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
2 3 4 |
# File 'app/components/govuk_component/summary_list_component/value_component.rb', line 2 def text @text end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/components/govuk_component/summary_list_component/value_component.rb', line 10 def call tag.dd(value_content, **html_attributes) end |