Exception: VerbotenKeys::Errors::StrategyMustBeASymbolError

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

Instance Method Summary collapse

Constructor Details

#initialize(invalid_strategy) ⇒ StrategyMustBeASymbolError

Returns a new instance of StrategyMustBeASymbolError.



22
23
24
25
26
# File 'lib/verboten_keys/errors.rb', line 22

def initialize(invalid_strategy)
  invalid_strategy_string = invalid_strategy&.to_s || 'nil'
  invalid_strategy_class = invalid_strategy.class.to_s
  super("VerbotenKeys' strategy must be a symbol. You passed in #{invalid_strategy_string}, which was a #{invalid_strategy_class}.")
end