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