class Dry::Types::Hash::Schema

def coerce(hash)

Returns:
  • (Hash{Symbol => Object}) -

Parameters:
  • hash (Hash) --
def coerce(hash)
  resolve(hash) do |type, key, value|
    begin
      type.call(value)
    rescue ConstraintError
      raise SchemaError.new(key, value)
    end
  end
end