Class: Dry::Validation::InputProcessorCompiler::Sanitizer
Constant Summary
collapse
- PREDICATE_MAP =
{
default: 'string',
none?: 'nil',
bool?: 'bool',
str?: 'string',
int?: 'integer',
float?: 'float',
decimal?: 'decimal',
date?: 'date',
date_time?: 'date_time',
time?: 'time',
hash?: 'hash',
array?: 'array'
}.freeze
- CONST_MAP =
{
NilClass => 'nil',
String => 'string',
Integer => 'integer',
Float => 'float',
BigDecimal => 'decimal',
Array => 'array',
Hash => 'hash',
Date => 'date',
DateTime => 'date_time',
Time => 'time',
TrueClass => 'true',
FalseClass => 'false'
}.freeze
DEFAULT_TYPE_NODE
Instance Attribute Summary
#type_compiler
Instance Method Summary
collapse
#call, #constructor, #initialize, #schema_ast, #type, #visit, #visit_and, #visit_each, #visit_implication, #visit_key, #visit_not, #visit_or, #visit_predicate, #visit_rule, #visit_schema, #visit_set, #visit_type, #visit_val
Instance Method Details
#array_node(members) ⇒ Object
42
43
44
|
# File 'lib/dry/validation/input_processor_compiler/sanitizer.rb', line 42
def array_node(members)
[:array, [members, {}]]
end
|
#hash_node(schema) ⇒ Object
38
39
40
|
# File 'lib/dry/validation/input_processor_compiler/sanitizer.rb', line 38
def hash_node(schema)
[:hash, [:weak, schema, {}]]
end
|
#identifier ⇒ Object
34
35
36
|
# File 'lib/dry/validation/input_processor_compiler/sanitizer.rb', line 34
def identifier
:sanitizer
end
|