Class: Dry::Types::Hash::Permissive
- Inherits:
-
Schema
- Object
- Definition
- Dry::Types::Hash
- Schema
- Dry::Types::Hash::Permissive
- Defined in:
- lib/dry/types/hash/schema.rb
Overview
Permissive schema raises a MissingKeyError if the given key is missing in provided hash.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Schema
Attributes inherited from Definition
Attributes included from Options
Instance Method Summary collapse
Methods inherited from Schema
#call, #coerce, #initialize, #resolve, #try, #try_coerce
Methods inherited from Dry::Types::Hash
#permissive, #schema, #strict, #strict_with_defaults, #symbolized, #weak
Methods inherited from Definition
[], #call, #constrained?, #default?, #failure, #initialize, #name, #primitive?, #result, #success, #try
Methods included from Builder
#constrained, #constrained_type, #constructor, #default, #enum, #maybe, #optional, #safe, #|
Methods included from Options
Constructor Details
This class inherits a constructor from Dry::Types::Hash::Schema
Instance Method Details
#resolve_missing_value(_, key, _) ⇒ Object (private)
118 119 120 |
# File 'lib/dry/types/hash/schema.rb', line 118 def resolve_missing_value(_, key, _) raise MissingKeyError, key end |