Module: Fog::CDN
- Defined in:
- lib/fog/cdn.rb,
lib/fog/cdn/aws.rb,
lib/fog/cdn/rackspace.rb,
lib/fog/cdn/requests/aws/get_distribution.rb,
lib/fog/cdn/requests/aws/post_distribution.rb,
lib/fog/cdn/requests/aws/post_invalidation.rb,
lib/fog/cdn/requests/aws/delete_distribution.rb,
lib/fog/cdn/requests/rackspace/put_container.rb,
lib/fog/cdn/requests/rackspace/get_containers.rb,
lib/fog/cdn/requests/rackspace/head_container.rb,
lib/fog/cdn/requests/rackspace/post_container.rb,
lib/fog/cdn/requests/aws/get_distribution_list.rb,
lib/fog/cdn/requests/aws/put_distribution_config.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.[](provider) ⇒ Object
4 5 6 |
# File 'lib/fog/cdn.rb', line 4 def self.[](provider) self.new(:provider => provider) end |
.new(attributes) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fog/cdn.rb', line 8 def self.new(attributes) attributes = attributes.dup # prevent delete from having side effects case provider = attributes.delete(:provider).to_s.downcase.to_sym when :aws require 'fog/cdn/aws' Fog::CDN::AWS.new(attributes) when :rackspace require 'fog/cdn/rackspace' Fog::CDN::Rackspace.new(attributes) else raise ArgumentError.new("#{provider} is not a recognized cdn provider") end end |