Class: GOVUKDesignSystemFormBuilder::Elements::Time
- 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
-
#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
constructor
A new instance of Time.
Methods included from Traits::ContentBeforeAndAfter
#after_input_content, #before_input_content
Methods included from Traits::DateInput
Methods included from Traits::Localisation
Methods included from Traits::HTMLClasses
Methods included from Traits::Supplemental
Methods included from Traits::Hint
Methods included from Traits::Error
Methods inherited from Base
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 |