module Baidupay::Utils

Public Class Methods

stringify_keys(hash) click to toggle source
# File lib/baidupay/utils.rb, line 3
def self.stringify_keys(hash)
  new_hash = {}
  hash.each do |key, value|
    new_hash[(key.to_s rescue key) || key] = value
  end
  new_hash
end