Class: GOVUKDesignSystemFormBuilder::Containers::CheckBoxes

Inherits:
Base
  • Object
show all
Includes:
Traits::HTMLAttributes, Traits::HTMLClasses
Defined in:
lib/govuk_design_system_formbuilder/containers/check_boxes.rb

Instance Method Summary collapse

Methods included from Traits::HTMLAttributes

#attributes

Methods included from Traits::HTMLClasses

#build_classes

Methods inherited from Base

#field_id, #to_s

Constructor Details

#initialize(builder, small:, **kwargs) ⇒ CheckBoxes

Returns a new instance of CheckBoxes.



7
8
9
10
11
12
# File 'lib/govuk_design_system_formbuilder/containers/check_boxes.rb', line 7

def initialize(builder, small:, **kwargs)
  super(builder, nil, nil)

  @small = small
  @html_attributes = kwargs
end

Instance Method Details

#html(&block) ⇒ Object



14
15
16
# File 'lib/govuk_design_system_formbuilder/containers/check_boxes.rb', line 14

def html(&block)
  tag.div(**attributes(@html_attributes), &block)
end