Method: Fog.symbolize_credentials

Defined in:
lib/fog/core/credentials.rb

.symbolize_credentials(args) ⇒ Object



57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/fog/core/credentials.rb', line 57

def self.symbolize_credentials(args)
  if args.is_a? Hash
    copy = Array.new
    args.each do |key, value|
      obj = symbolize_credential?(key) ? self.symbolize_credentials(value) : value
      copy.push(key.to_sym, obj)
    end
    Hash[*copy]
  else
    args
  end
end