Sha256: 0657bab75694891de53169018ba9a72e07cce6c6a8200c24d7189970d36a7afe

Contents?: true

Size: 605 Bytes

Versions: 19

Compression:

Stored size: 605 Bytes

Contents

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

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
fog-0.3.31 lib/fog/core/storage.rb
fog-0.3.30 lib/fog/core/storage.rb
fog-0.3.29 lib/fog/core/storage.rb
fog-0.3.28 lib/fog/core/storage.rb
fog-0.3.27 lib/fog/core/storage.rb
fog-0.3.26 lib/fog/core/storage.rb
fog-0.3.25 lib/fog/core/storage.rb
fog-0.3.24 lib/fog/core/storage.rb
bbcloud-0.8.1 lib/bbcloud/vendor/fog-0.3.23/lib/fog/core/storage.rb
fog-0.3.23 lib/fog/core/storage.rb
fog-0.3.22 lib/fog/core/storage.rb
fog-0.3.21 lib/fog/core/storage.rb
fog-0.3.20 lib/fog/core/storage.rb
fog-0.3.19 lib/fog/core/storage.rb
fog-0.3.18 lib/fog/core/storage.rb
fog-0.3.17 lib/fog/core/storage.rb
fog-0.3.16 lib/fog/core/storage.rb
fog-0.3.15 lib/fog/core/storage.rb
fog-0.3.14 lib/fog/core/storage.rb