Class: GovukComponent::SummaryList::Row

Inherits:
GovukComponent::Slot show all
Defined in:
app/components/govuk_component/summary_list.rb

Instance Attribute Summary collapse

Attributes included from Traits::CustomHtmlAttributes

#html_attributes

Instance Method Summary collapse

Methods included from Traits::CustomClasses

#classes

Constructor Details

#initialize(key:, value:, action: nil, classes: [], html_attributes: {}) ⇒ Row

Returns a new instance of Row.



20
21
22
23
24
25
26
# File 'app/components/govuk_component/summary_list.rb', line 20

def initialize(key:, value:, action: nil, classes: [], html_attributes: {})
  super(classes: classes, html_attributes: html_attributes)

  self.key    = key
  self.value  = value
  self.action = action
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



18
19
20
# File 'app/components/govuk_component/summary_list.rb', line 18

def action
  @action
end

#keyObject

Returns the value of attribute key.



18
19
20
# File 'app/components/govuk_component/summary_list.rb', line 18

def key
  @key
end

#valueObject

Returns the value of attribute value.



18
19
20
# File 'app/components/govuk_component/summary_list.rb', line 18

def value
  @value
end