mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
19 lines
512 B
Ruby
19 lines
512 B
Ruby
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
|