Exception: Hashing::UnconfiguredIvar

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hashing.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

Constructor Details

#initialize(ivar_name, class_name) ⇒ UnconfiguredIvar

Returns a new instance of UnconfiguredIvar.



9
10
11
12
# File 'lib/hashing.rb', line 9

def initialize(ivar_name, class_name)
  super "The Hash has a :#{ivar_name} key, "+
    "but no @#{ivar_name} was configured in #{class_name}"
end