Sha256: 89347a26985b326edbf7788cf32b4f929596cfa4cbda60110213daa04d8e44e1
Contents?: true
Size: 475 Bytes
Versions: 53
Compression:
Stored size: 475 Bytes
Contents
module WebMock module Util class HashKeysStringifier def self.stringify_keys!(arg) case arg when Array arg.map { |elem| stringify_keys!(elem) } when Hash Hash[ *arg.map { |key, value| k = key.is_a?(Symbol) ? key.to_s : key v = stringify_keys!(value) [k,v] }.inject([]) {|r,x| r + x}] else arg end end end end end
Version data entries
53 entries across 53 versions & 4 rubygems