Class: Fog::CDN
- Inherits:
-
Object
- Object
- Fog::CDN
- Defined in:
- lib/fog/cdn.rb
Class Method Summary collapse
Class Method Details
.new(attributes) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/fog/cdn.rb', line 4 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 |