Sha256: 7774244a2cbe0669dd97c8cb9c50eadb15747461d7fb41c4f0d2b0416093218e
Contents?: true
Size: 488 Bytes
Versions: 5
Compression:
Stored size: 488 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
5 entries across 5 versions & 2 rubygems