Exception: VerbotenKeys::Errors::StrategyMustBeASymbolError
- Inherits:
-
StandardError
- Object
- StandardError
- VerbotenKeys::Errors::StrategyMustBeASymbolError
- Defined in:
- lib/verboten_keys/errors.rb
Instance Method Summary collapse
-
#initialize(invalid_strategy) ⇒ StrategyMustBeASymbolError
constructor
A new instance of StrategyMustBeASymbolError.
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 |