goldmine 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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
|