Exception: ConvenientService::Support::Arguments::Exceptions::InvalidKeyType

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/support/arguments/exceptions.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(key:) ⇒ void

This method returns an undefined value.

Parameters:

  • key (Object)

    Can be any type.



12
13
14
15
16
17
18
19
20
# File 'lib/convenient_service/support/arguments/exceptions.rb', line 12

def initialize_with_kwargs(key:)
  message = <<~TEXT
    `#[]` accepts only `Integer` and `String` keys.

    Key `#{key.inspect}` has `#{key.class}` class.
  TEXT

  initialize(message)
end