Class: CCS::Components::GovUK::SummaryList::Row::Value
- Defined in:
- lib/ccs/components/govuk/summary_list/row/value.rb
Overview
GOV.UK Summary list row value
Constant Summary collapse
- DEFAULT_ATTRIBUTES =
The default attributes for the summary list row value
{ class: 'govuk-summary-list__value' }.freeze
Instance Method Summary collapse
-
#initialize(text:, **options) ⇒ Value
constructor
A new instance of Value.
-
#render ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK Summary list row value.
Constructor Details
#initialize(text:, **options) ⇒ Value
Returns a new instance of Value.
25 26 27 28 29 |
# File 'lib/ccs/components/govuk/summary_list/row/value.rb', line 25 def initialize(text:, **) super(**) @text = text end |
Instance Method Details
#render ⇒ ActiveSupport::SafeBuffer
Generates the HTML for the GOV.UK Summary list row value
35 36 37 |
# File 'lib/ccs/components/govuk/summary_list/row/value.rb', line 35 def render tag.dd(text, class: @options[:attributes][:class]) end |