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