Method: CCS::Components::GovUK::InsetText#initialize

Defined in:
lib/ccs/components/govuk/inset_text.rb

#initialize(text: nil) ⇒ InsetText

Returns a new instance of InsetText.

Parameters:

  • text (String) (defaults to: nil)

    text to use within the inset text component. If nil, then a block will be rendered

  • options (Hash)

    options that will be used in customising the HTML



28
29
30
31
32
# File 'lib/ccs/components/govuk/inset_text.rb', line 28

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

  @text = text
end