Sha256: 7a1c9b185d3cf73a9b5eb6a1e27ccb0a04f08f7c2fabb29d878d82027be213fe
Contents?: true
Size: 1.04 KB
Versions: 13
Compression:
Stored size: 1.04 KB
Contents
module Dry module Validation class InputProcessorCompiler::JSON < InputProcessorCompiler PREDICATE_MAP = { default: 'string', none?: 'json.nil', bool?: 'bool', str?: 'string', int?: 'int', float?: 'float', decimal?: 'json.decimal', date?: 'json.date', date_time?: 'json.date_time', time?: 'json.time' }.freeze CONST_MAP = { NilClass => 'nil', String => 'string', Fixnum => 'int', Integer => 'int', Float => 'float', BigDecimal => 'json.decimal', Array => 'json.array', Hash => 'json.hash', Date => 'json.date', DateTime => 'json.date_time', Time => 'json.time', TrueClass => 'true', FalseClass => 'false' }.freeze def identifier :json end def hash_node(schema) [:type, ['json.hash', [:symbolized, schema]]] end def array_node(members) [:type, ['json.array', members]] end end end end
Version data entries
13 entries across 13 versions & 1 rubygems