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