Sha256: 17bf9cff4c6bc254f016145464f62b064c71de3ac42c661089cfdd978a8424dc
Contents?: true
Size: 392 Bytes
Versions: 1
Compression:
Stored size: 392 Bytes
Contents
# frozen_string_literal: true # override Hash class class Hash def each_with_parent(parent = nil, &block) each do |key, value| if value.is_a?(Hash) deep_hash_with_parent(value, key, &block) elsif block_given? yield(parent, key, value) end end end def deep_hash_with_parent(value, key, &block) value.each_with_parent(key, &block) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asana_exception_notifier-0.4.0 | lib/asana_exception_notifier/initializers/hash.rb |