1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/core/storage.rb
geemus 3b59607a14 Revert "allow symbol or string for top level compute/storage"
This reverts commit 74469880ef.

all the other config is strings, leave them this way for consistency
2010-11-03 17:31:07 -07:00

24 lines
605 B
Ruby

module Fog
class Storage
def self.new(attributes)
case provider = attributes.delete(:provider)
when 'AWS'
require 'fog/aws'
Fog::AWS::Storage.new(attributes)
when 'Google'
require 'fog/google'
Fog::Google::Storage.new(attributes)
when 'Local'
require 'fog/local'
Fog::Local::Storage.new(attributes)
when 'Rackspace'
require 'fog/rackspace'
Fog::Rackspace::Storage.new(attributes)
else
raise ArgumentError.new("#{provider} is not a recognized storage provider")
end
end
end
end