module Func::Hash
Public Instance Methods
hash_fetch(target, *keys)
click to toggle source
Deep fetch values out of a hash.
hash_fetch(target, :a, :b, :c) target.fetch(:a).fetch(:b).fetch(:c)
# File lib/func/hash.rb, line 8 def hash_fetch(target, *keys) keys.each {|key| target = target.fetch(key) } target end