Sha256: 311ef833228193bb82dfd5de3995c15016c783b71b3428af4ae20b3aa5ae39d0
Contents?: true
Size: 707 Bytes
Versions: 11
Compression:
Stored size: 707 Bytes
Contents
module GOVUKDesignSystemFormBuilder module Traits module Hint def hint_id return nil unless hint_element.active? build_id('hint') end private def hint_element @hint_element ||= if @hint.nil? Elements::Null.new else Elements::Hint.new(@builder, @object_name, @attribute_name, **hint_content) end end def hint_content case @hint when Hash @hint when Proc { content: @hint } else fail(ArgumentError, %(hint must be a Proc or Hash)) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems