module Fog::StringifyKeys
Public Class Methods
Source
# File lib/fog/core/stringify_keys.rb, line 4 def self.stringify(original_hash) transform_hash(original_hash) do |hash, key, value| hash[key.to_s] = value end end
Returns a new hash with all keys converted to strings.
Source
# File lib/fog/core/stringify_keys.rb, line 11 def self.transform_hash(original, &block) original.reduce({}) do |result, (key, value)| block.call(result, key, value) result end end