Module: Fog::CDN
- Defined in:
- lib/fog/cdn.rb,
lib/fog/hp/cdn.rb,
lib/fog/aws/cdn.rb,
lib/fog/rackspace/cdn.rb,
lib/fog/aws/models/cdn/distribution.rb,
lib/fog/aws/models/cdn/invalidation.rb,
lib/fog/aws/models/cdn/distributions.rb,
lib/fog/aws/models/cdn/invalidations.rb,
lib/fog/hp/requests/cdn/put_container.rb,
lib/fog/hp/requests/cdn/get_containers.rb,
lib/fog/hp/requests/cdn/head_container.rb,
lib/fog/hp/requests/cdn/post_container.rb,
lib/fog/hp/requests/cdn/delete_container.rb,
lib/fog/aws/requests/cdn/get_distribution.rb,
lib/fog/aws/requests/cdn/get_invalidation.rb,
lib/fog/aws/models/cdn/distribution_helper.rb,
lib/fog/aws/requests/cdn/post_distribution.rb,
lib/fog/aws/requests/cdn/post_invalidation.rb,
lib/fog/aws/models/cdn/distributions_helper.rb,
lib/fog/aws/requests/cdn/delete_distribution.rb,
lib/fog/rackspace/requests/cdn/delete_object.rb,
lib/fog/rackspace/requests/cdn/put_container.rb,
lib/fog/aws/models/cdn/streaming_distribution.rb,
lib/fog/rackspace/requests/cdn/get_containers.rb,
lib/fog/rackspace/requests/cdn/head_container.rb,
lib/fog/rackspace/requests/cdn/post_container.rb,
lib/fog/aws/models/cdn/streaming_distributions.rb,
lib/fog/aws/requests/cdn/get_distribution_list.rb,
lib/fog/aws/requests/cdn/get_invalidation_list.rb,
lib/fog/aws/requests/cdn/put_distribution_config.rb,
lib/fog/aws/requests/cdn/get_streaming_distribution.rb,
lib/fog/aws/requests/cdn/post_streaming_distribution.rb,
lib/fog/aws/requests/cdn/delete_streaming_distribution.rb,
lib/fog/aws/requests/cdn/get_streaming_distribution_list.rb,
lib/fog/aws/requests/cdn/put_streaming_distribution_config.rb
Defined Under Namespace
Classes: AWS, HP, Rackspace
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
|
# File 'lib/fog/cdn.rb', line 8
def self.new(attributes)
attributes = attributes.dup provider = attributes.delete(:provider).to_s.downcase.to_sym
if self.providers.include?(provider)
require "fog/#{provider}/cdn"
return Fog::CDN.const_get(Fog.providers[provider]).new(attributes)
end
raise ArgumentError.new("#{provider} is not a recognized cdn provider")
end
|
.providers ⇒ Object
18
19
20
|
# File 'lib/fog/cdn.rb', line 18
def self.providers
Fog.services[:cdn]
end
|