Class: GOVUKDesignSystemFormBuilder::Containers::CheckBoxesFieldset
- Includes:
- Traits::Error, Traits::Hint
- Defined in:
- lib/govuk_design_system_formbuilder/containers/check_boxes_fieldset.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(builder, object_name, attribute_name, hint:, legend:, caption:, small:, form_group:, multiple:, **kwargs, &block) ⇒ CheckBoxesFieldset
constructor
A new instance of CheckBoxesFieldset.
Methods included from Traits::Hint
Methods included from Traits::Error
Methods inherited from Base
Constructor Details
#initialize(builder, object_name, attribute_name, hint:, legend:, caption:, small:, form_group:, multiple:, **kwargs, &block) ⇒ CheckBoxesFieldset
Returns a new instance of CheckBoxesFieldset.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/govuk_design_system_formbuilder/containers/check_boxes_fieldset.rb', line 7 def initialize(builder, object_name, attribute_name, hint:, legend:, caption:, small:, form_group:, multiple:, **kwargs, &block) fail LocalJumpError, 'no block given' unless block_given? super(builder, object_name, attribute_name, &block) @legend = legend @caption = @hint = hint @small = small @form_group = form_group @multiple = multiple @html_attributes = kwargs end |
Instance Method Details
#html ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/govuk_design_system_formbuilder/containers/check_boxes_fieldset.rb', line 21 def html Containers::FormGroup.new(*bound, **@form_group).html do Containers::Fieldset.new(*bound, **).html do safe_join([hint_element, error_element, hidden_field, checkboxes]) end end end |