Exception: VerbotenKeys::Errors::ForbiddenKeysMustBeAnArrayError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/verboten_keys/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(invalid_forbidden_keys) ⇒ ForbiddenKeysMustBeAnArrayError

Returns a new instance of ForbiddenKeysMustBeAnArrayError.



6
7
8
9
10
# File 'lib/verboten_keys/errors.rb', line 6

def initialize(invalid_forbidden_keys)
  invalid_forbidden_keys_string = invalid_forbidden_keys&.to_s || 'nil'
  invalid_forbidden_keys_class = invalid_forbidden_keys.class.to_s
  super("VerbotenKeys' forbidden_keys must be an array of symbols. You passed in #{invalid_forbidden_keys_string}, which was a #{invalid_forbidden_keys_class}.")
end