goldmine 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/goldmine.rb +2 -2
- metadata +1 -1
data/lib/goldmine.rb
CHANGED
@@ -25,11 +25,11 @@ module Goldmine
|
|
25
25
|
module HashMiner
|
26
26
|
attr_accessor :goldmine
|
27
27
|
def dig(name=nil, &block)
|
28
|
-
return self unless
|
28
|
+
return self unless goldmine
|
29
29
|
reduce({}) do |memo, item|
|
30
30
|
key = item.first
|
31
31
|
value = item.last
|
32
|
-
value.
|
32
|
+
value.dig(name, &block).each do |k, v|
|
33
33
|
new_key = []
|
34
34
|
if key.is_a? Array
|
35
35
|
new_key = new_key + key
|