Sha256: 9884d92ea9011568d657c7d2a04c85f6b0e0fa83cff0f3b13c09f3188d0d5fed
Contents?: true
Size: 436 Bytes
Versions: 13
Compression:
Stored size: 436 Bytes
Contents
module Elastic module AppSearch module Utils extend self def stringify_keys(hash) hash.each_with_object({}) do |(key, value), out| out[key.to_s] = value end end def symbolize_keys(hash) hash.each_with_object({}) do |(key, value), out| new_key = key.respond_to?(:to_sym) ? key.to_sym : key out[new_key] = value end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems