Sha256: 90620d0f11eb4f730420fb78652a64782e0ea6614867e4f0131a5096a1df023e
Contents?: true
Size: 161 Bytes
Versions: 3
Compression:
Stored size: 161 Bytes
Contents
class Hash def deep_find(key) key?(key) ? self[key] : self.values.inject(nil) {|memo, v| memo ||= v.deep_find(key) if v.respond_to?(:deep_find) } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
openstudio-analysis-0.3.4 | lib/openstudio/helpers/hash.rb |
openstudio-analysis-0.3.3 | lib/openstudio/helpers/hash.rb |
openstudio-analysis-0.3.2 | lib/openstudio/helpers/hash.rb |