Exception: VerbotenKeys::Errors::ForbiddenKeysMustOnlyContainSymbolsError

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

Instance Method Summary collapse

Constructor Details

#initialize(invalid_forbidden_keys, invalid_forbidden_key) ⇒ ForbiddenKeysMustOnlyContainSymbolsError

Returns a new instance of ForbiddenKeysMustOnlyContainSymbolsError.



14
15
16
17
18
# File 'lib/verboten_keys/errors.rb', line 14

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