Method: CCS::Components::GovUK::SummaryList::Row#initialize
- Defined in:
- lib/ccs/components/govuk/summary_list/row.rb
#initialize(any_row_has_actions:, key:, value:, actions: nil, card_title: nil) ⇒ Row
Returns a new instance of Row.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ccs/components/govuk/summary_list/row.rb', line 39 def initialize(any_row_has_actions:, key:, value:, actions: nil, card_title: nil, **) super(**) actions_present = actions && actions[:items].present? @options[:attributes][:class] << ' govuk-summary-list__row--no-actions' if any_row_has_actions && !actions_present @key = Key.new(context: @context, **key) @value = Value.new(context: @context, **value) @actions = Actions.new(context: @context, card_title: card_title, **actions) if actions_present end |