# File lib/fog/storage.rb, line 8
    def self.new(attributes)
      attributes = attributes.dup # prevent delete from having side effects
      case provider = attributes.delete(:provider).to_s.downcase.to_sym
      when :aws
        require 'fog/storage/aws'
        Fog::Storage::AWS.new(attributes)
      when :google
        require 'fog/storage/google'
        Fog::Storage::Google.new(attributes)
      when :local
        require 'fog/storage/local'
        Fog::Storage::Local.new(attributes)
      when :rackspace
        require 'fog/storage/rackspace'
        Fog::Storage::Rackspace.new(attributes)
      else
        raise ArgumentError.new("#{provider} is not a recognized storage provider")
      end
    end