Class: GOVUKDesignSystemFormBuilder::Containers::Supplemental
- Defined in:
- lib/govuk_design_system_formbuilder/containers/supplemental.rb
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(builder, object_name, attribute_name, content) ⇒ Supplemental
constructor
A new instance of Supplemental.
Methods inherited from Base
Constructor Details
#initialize(builder, object_name, attribute_name, content) ⇒ Supplemental
Returns a new instance of Supplemental.
4 5 6 7 8 |
# File 'lib/govuk_design_system_formbuilder/containers/supplemental.rb', line 4 def initialize(builder, object_name, attribute_name, content) super(builder, object_name, attribute_name) @content = content end |
Instance Method Details
#html ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/govuk_design_system_formbuilder/containers/supplemental.rb', line 10 def html return if @content.blank? warn("Supplemental content is deprecated and support will soon be removed. See https://github.com/x-govuk/govuk-form-builder/issues/445") tag.div(id: supplemental_id) { @content } end |