DFE-Digital/govuk-formbuilder

View on GitHub
lib/govuk_design_system_formbuilder/traits/caption.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module GOVUKDesignSystemFormBuilder
  module Traits
    module Caption
    private

      def caption_element
        @caption_element ||= if @caption.nil?
                               Elements::Null.new
                             else
                               Elements::Caption.new(*bound, **@caption)
                             end
      end
    end
  end
end