Sha256: 35fedc798fee923bfc306be04b7750145e10107c04aa743ecb32879b33200c69
Contents?: true
Size: 262 Bytes
Versions: 6
Compression:
Stored size: 262 Bytes
Contents
Hash.class_eval do def nested_fetch(path) Array(path).dup.reduce(self) { |current, key| current[key] } end def nested_delete(path) path = Array(path).dup last_path_element = path.pop nested_fetch(path).delete last_path_element end end
Version data entries
6 entries across 6 versions & 1 rubygems