Class: GOVUKDesignSystemFormBuilder::Elements::Time

Inherits:
Base
  • Object
show all
Includes:
Traits::ContentBeforeAndAfter, Traits::DateInput, Traits::Error, Traits::HTMLClasses, Traits::Hint, Traits::Localisation, Traits::Supplemental
Defined in:
lib/govuk_design_system_formbuilder/elements/time.rb

Constant Summary

Constants included from Traits::DateInput

Traits::DateInput::MULTIPARAMETER_KEY, Traits::DateInput::SEGMENT_METHOD

Constants included from Traits::Localisation

Traits::Localisation::BASE_NAME_REGEXP

Instance Method Summary collapse

Methods included from Traits::ContentBeforeAndAfter

#after_input_content, #before_input_content

Methods included from Traits::DateInput

#html

Methods included from Traits::Localisation

#localised_text

Methods included from Traits::HTMLClasses

#build_classes

Methods included from Traits::Supplemental

#supplemental_id

Methods included from Traits::Hint

#hint_id

Methods included from Traits::Error

#error_id

Methods inherited from Base

#field_id, #to_s

Constructor Details

#initialize(builder, object_name, attribute_name, legend:, caption:, hint:, omit_second:, maxlength_enabled:, segments:, form_group:, before_inputs:, after_inputs:, segment_names:, **kwargs, &block) ⇒ Time

Returns a new instance of Time.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/govuk_design_system_formbuilder/elements/time.rb', line 14

def initialize(builder, object_name, attribute_name, legend:, caption:, hint:, omit_second:, maxlength_enabled:, segments:, form_group:, before_inputs:, after_inputs:, segment_names:, **kwargs, &block)
  super(builder, object_name, attribute_name, &block)

  @legend            = legend
  @caption           = caption
  @hint              = hint
  @omit_second       = omit_second
  @maxlength_enabled = maxlength_enabled
  @segments          = segments
  @segment_names     = segment_names
  @form_group        = form_group
  @html_attributes   = kwargs
  @before_input      = before_inputs
  @after_input       = after_inputs
end