lib/figgy/hash.rb in figgy-1.2.0 vs lib/figgy/hash.rb in figgy-1.3.0

- old
+ new

@@ -15,10 +15,14 @@ def []=(key, value) super(convert_key(key), value) end + def fetch(key, *extras) + super(convert_key(key), *extras) + end + def delete(key) super(convert_key(key)) end def values_at(*indices) @@ -33,9 +37,13 @@ other.each do |key, value| self[convert_key(key)] = value end self end + + def dig(*keys) + super(*keys.map { |k| convert_key(k) }) + end if ::Hash.method_defined?(:dig) def respond_to?(m, *) super || key?(convert_key(m)) end if RUBY_VERSION == "1.8.7"