Sha256: df75ef9c15a17eeedf8abef16d59c491644b4f65441f003746c3ddefb3a73eb0
Contents?: true
Size: 659 Bytes
Versions: 13
Compression:
Stored size: 659 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. module NewRelic module Agent module HashExtensions module_function # recurses through hashes and arrays and stringifies keys def stringify_keys_in_object(object) case object when Hash object.inject({}) do |memo, (k, v)| memo[k.to_s] = stringify_keys_in_object(v) memo end when Array object.map {|o| stringify_keys_in_object(o)} else object end end end end end
Version data entries
13 entries across 13 versions & 2 rubygems