Exception: RubyArguments::Exceptions::InvalidKeyType

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_arguments.rb

Class Method Summary collapse

Class Method Details

.create(key:) ⇒ RubyArguments::Exceptions::InvalidKeyType

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • Can be any type.

Returns:

API:

  • private



20
21
22
23
24
25
26
27
28
# File 'lib/ruby_arguments.rb', line 20

def create(key:)
  message = "    `#[]` accepts only `Integer` and `String` keys.\n\n    Key `\#{key.inspect}` has `\#{key.class}` class.\n  TEXT\n\n  new(message)\nend\n"