Sha256: 5a90958b35592116ba5441546d452ef76f0a9f3aeacbd4bb1acd9fcac2ca8eae
Contents?: true
Size: 670 Bytes
Versions: 50
Compression:
Stored size: 670 Bytes
Contents
module GOVUKDesignSystemFormBuilder module Traits module Hint def hint_id return unless hint_element.active? build_id('hint') end private def hint_element @hint_element ||= if @hint.nil? Elements::Null.new else Elements::Hint.new(*bound, **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
50 entries across 50 versions & 2 rubygems