Sha256: 41b14da294fb5560833ce6ec918e685e3bf681c0ad6a27212b96f4dea7511a15

Contents?: true

Size: 512 Bytes

Versions: 11

Compression:

Stored size: 512 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 cdn provider")
      end
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/cdn.rb
fog-0.8.1 lib/fog/cdn.rb
fog-0.8.0 lib/fog/cdn.rb
fog-0.7.2 lib/fog/cdn.rb
fog-0.7.1 lib/fog/cdn.rb
fog-0.7.0 lib/fog/cdn.rb
fog-0.6.0 lib/fog/cdn.rb
fog-0.5.3 lib/fog/cdn.rb
fog-0.5.2 lib/fog/cdn.rb
fog-0.5.1 lib/fog/cdn.rb
fog-0.5.0 lib/fog/cdn.rb