Class: GOVUKDesignSystemFormBuilder::Containers::Radios

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

Instance Method Summary collapse

Methods included from Traits::HTMLClasses

#build_classes

Methods included from Traits::HTMLAttributes

#attributes

Methods included from Traits::Hint

#hint_id

Methods inherited from Base

#field_id, #to_s

Constructor Details

#initialize(builder, inline:, small:, **kwargs) ⇒ Radios

Returns a new instance of Radios.



8
9
10
11
12
13
14
# File 'lib/govuk_design_system_formbuilder/containers/radios.rb', line 8

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

  @inline          = inline
  @small           = small
  @html_attributes = kwargs
end

Instance Method Details

#html(&block) ⇒ Object



16
17
18
# File 'lib/govuk_design_system_formbuilder/containers/radios.rb', line 16

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