Sha256: 9fae03b2265b3a46fbf8b4c116b33db652f34424067687492ca1c2c8f4063c0b

Contents?: true

Size: 516 Bytes

Versions: 5

Compression:

Stored size: 516 Bytes

Contents

module Fog
  class CDN

    def self.new(attributes)
      attributes = attributes.dup # prevent delete from having side effects
      case provider = attributes[:provider] # attributes.delete(:provider)
      when 'AWS'
        require 'fog/cdn/aws'
        Fog::AWS::CDN.new(attributes)
      when 'Rackspace'
        require 'fog/cdn/rackspace'
        Fog::Rackspace::CDN.new(attributes)
      else
        raise ArgumentError.new("#{provider} is not a recognized storage provider")
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
phpfog-fog-0.4.1.3 lib/fog/cdn.rb
phpfog-fog-0.4.1.2 lib/fog/cdn.rb
phpfog-fog-0.4.1.1 lib/fog/cdn.rb
phpfog-fog-0.4.1 lib/fog/cdn.rb
fog-0.4.1 lib/fog/cdn.rb