Class: GOVUKDesignSystemFormBuilder::Containers::FormGroup
- Includes:
- Traits::HTMLAttributes, Traits::HTMLClasses
- Defined in:
- lib/govuk_design_system_formbuilder/containers/form_group.rb
Instance Method Summary collapse
- #html(&block) ⇒ Object
-
#initialize(builder, object_name, attribute_name, **kwargs) ⇒ FormGroup
constructor
A new instance of FormGroup.
Methods included from Traits::HTMLClasses
Methods included from Traits::HTMLAttributes
Methods inherited from Base
Constructor Details
#initialize(builder, object_name, attribute_name, **kwargs) ⇒ FormGroup
Returns a new instance of FormGroup.
7 8 9 10 11 |
# File 'lib/govuk_design_system_formbuilder/containers/form_group.rb', line 7 def initialize(builder, object_name, attribute_name, **kwargs) super(builder, object_name, attribute_name) @html_attributes = kwargs end |
Instance Method Details
#html(&block) ⇒ Object
13 14 15 |
# File 'lib/govuk_design_system_formbuilder/containers/form_group.rb', line 13 def html(&block) tag.div(**attributes(@html_attributes), &block) end |