Class: Dry::Types::MissingKeyError

Inherits:
SchemaKeyError
  • Object
show all
Defined in:
lib/dry/types/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ MissingKeyError

Returns a new instance of MissingKeyError.

Parameters:

  • key (String, Symbol)


99
100
101
102
# File 'lib/dry/types/errors.rb', line 99

def initialize(key)
  @key = key
  super("#{key.inspect} is missing in Hash input")
end

Instance Attribute Details

#keySymbol (readonly)

Returns:

  • (Symbol)


96
97
98
# File 'lib/dry/types/errors.rb', line 96

def key
  @key
end