Method: Hash#deep_hash_with_parent

Defined in:
lib/asana_exception_notifier/initializers/hash.rb

#deep_hash_with_parent(value, key, &block) ⇒ void

This method returns an undefined value.

Checks if the value is a Hash , and will execute the each with parent for the given hash

Parameters:

  • value (Hash)

    The Hash that will be used for iteration

  • key (Hash)

    The key that will be sent as the parent key of the specified Hash

  • &block (Proc)

    The block which will be used to yield the parent string, the current key and the value, while the Hash is being iterated over

See Also:



47
48
49
50
# File 'lib/asana_exception_notifier/initializers/hash.rb', line 47

def deep_hash_with_parent(value, key, &block)
  return unless value.is_a?(Hash)
  value.each_with_parent(key, &block)
end