Exception: KeyError

Inherits:
Exception
  • Object
show all
Defined in:
lib/verbose_hash_fetch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_original_hashObject

Returns the value of attribute _original_hash.



2
3
4
# File 'lib/verbose_hash_fetch.rb', line 2

def _original_hash
  @_original_hash
end

Instance Method Details

#to_sObject



4
5
6
7
8
9
10
# File 'lib/verbose_hash_fetch.rb', line 4

def to_s
  if _original_hash
    "#{super} in #{_original_hash.class}: #{_original_hash.inspect}"
  else
    super
  end
end