Sha256: e733a7a47af29440a917661ddcfa296ea013dbe6fdb89497077e2ce5017d1be1

Contents?: true

Size: 471 Bytes

Versions: 2

Compression:

Stored size: 471 Bytes

Contents

module GOVUKDesignSystemFormBuilder
  module Containers
    class Supplemental < Base
      def initialize(builder, object_name, attribute_name, content)
        super(builder, object_name, attribute_name)

        @content = content
      end

      def html
        return nil if @content.blank?

        content_tag('div', id: supplemental_id) { @content }
      end

    private

      def supplemental_id
        build_id('supplemental')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
govuk_design_system_formbuilder-1.2.6 lib/govuk_design_system_formbuilder/containers/supplemental.rb
govuk_design_system_formbuilder-1.2.5 lib/govuk_design_system_formbuilder/containers/supplemental.rb