Module: Schema::Parsers::Hash
- Defined in:
- lib/schema/parsers/hash.rb
Overview
Schema::Parsers::Hash adds the hash type to schemas
Instance Method Summary collapse
Instance Method Details
#parse_hash(field_name, parsing_errors, value) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/schema/parsers/hash.rb', line 7 def parse_hash(field_name, parsing_errors, value) case value when ::Hash value else parsing_errors.add(field_name, ::Schema::ParsingErrors::INCOMPATABLE) nil end end |