Sha256: c4735cea9684784f7908597298d1bc3f9f80ddfbd792625145ea85f21f62133b

Contents?: true

Size: 582 Bytes

Versions: 3

Compression:

Stored size: 582 Bytes

Contents

module GOVUKDesignSystemFormBuilder
  module Containers
    class Supplemental < GOVUKDesignSystemFormBuilder::Base
      def initialize(builder, object_name, attribute_name, content)
        @builder        = builder
        @object_name    = object_name
        @attribute_name = attribute_name
        @content        = content
      end

      def html
        return nil unless @content.present?

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govuk_design_system_formbuilder-1.0.1 lib/govuk_design_system_formbuilder/containers/supplemental.rb
govuk_design_system_formbuilder-1.0.0 lib/govuk_design_system_formbuilder/containers/supplemental.rb
govuk_design_system_formbuilder-0.9.8 lib/govuk_design_system_formbuilder/containers/supplemental.rb