Exception: Hashing::UnconfiguredIvarError
- Inherits:
-
StandardError
- Object
- StandardError
- Hashing::UnconfiguredIvarError
- Defined in:
- lib/hashing/unconfigured_ivar_error.rb
Overview
Inform the user about an attempt to create an instance, using a ‘Hash` with keys that does not correspond to the mape made using `.hasherize`
Instance Method Summary collapse
-
#initialize(ivar_names, class_name) ⇒ UnconfiguredIvarError
constructor
A new instance of UnconfiguredIvarError.
Constructor Details
#initialize(ivar_names, class_name) ⇒ UnconfiguredIvarError
Returns a new instance of UnconfiguredIvarError.
5 6 7 8 9 10 11 |
# File 'lib/hashing/unconfigured_ivar_error.rb', line 5 def initialize(ivar_names, class_name) super [ "The hash passed to #{class_name}.from_hash has the following ", "keys that aren't configured by the .hasherize method: ", "#{ivar_names.join ","}." ].join end |