Sha256: 16e654b7414c4bde5f1beffef1e86b8510f81c22f2abd5a80838ec1313752b28
Contents?: true
Size: 1.03 KB
Versions: 12
Compression:
Stored size: 1.03 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', Fixnum => 'int', 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
12 entries across 12 versions & 1 rubygems