class Formulario::Field::DefaultTimeField
Private Class Methods
build(raw_value)
click to toggle source
# File lib/formulario/fields/default_time_field.rb, line 8 def self.build(raw_value) case raw_value when base_class new raw_value when ::Hash parse_hash(raw_value) when ::String new base_class.parse(raw_value) end end
has_invalid_keys?(hash)
click to toggle source
# File lib/formulario/fields/default_time_field.rb, line 26 def self.has_invalid_keys?(hash) hash.keys.any? {|key| !allowed_keys.include?(key) } end
invalid_keys_exceptional_value(hash)
click to toggle source
# File lib/formulario/fields/default_time_field.rb, line 19 def self.invalid_keys_exceptional_value(hash) ExceptionalValue.new(hash, reasons: [ "the only possible keys are: #{allowed_keys.map(&:inspect).join(', ')}" ]) end