Sha256: 2f397cbaa1f7fd061e31fdfe2688f3705f287bc61a504b0beae09dc04653c9b9
Contents?: true
Size: 429 Bytes
Versions: 1
Compression:
Stored size: 429 Bytes
Contents
module MongoProfiler class Util class << self def deep_keys(hash) return [] unless hash.is_a? Hash hash.inject([]) do |keys, (key, value)| keys << key case value when Hash keys.concat deep_keys(value) when Array value.each { |vvalue| keys.concat deep_keys(vvalue) } end keys end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo_profiler-0.0.2 | lib/mongo_profiler/util.rb |