Method: CCS::Components::GovUK::Table::Body::HeadCell#initialize

Defined in:
lib/ccs/components/govuk/table/body/head_cell.rb

#initialize(text:) ⇒ HeadCell

Returns a new instance of HeadCell.

Parameters:

  • text (String)

    the text of the cell

  • options (Hash)

    options that will be used in customising the HTML



28
29
30
31
32
33
34
# File 'lib/ccs/components/govuk/table/body/head_cell.rb', line 28

def initialize(text:, **)
  super(**)

  @options[:attributes][:scope] = 'row'

  @text = text
end