Module: Fog::CDN

Defined in:
lib/fog/cdn.rb,
lib/fog/aws/cdn.rb,
lib/fog/rackspace/cdn.rb,
lib/fog/aws/requests/cdn/get_distribution.rb,
lib/fog/aws/requests/cdn/post_distribution.rb,
lib/fog/aws/requests/cdn/post_invalidation.rb,
lib/fog/aws/requests/cdn/delete_distribution.rb,
lib/fog/rackspace/requests/cdn/put_container.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/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, 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
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/aws/cdn'
    Fog::CDN::AWS.new(attributes)
  when :rackspace
    require 'fog/rackspace/cdn'
    Fog::CDN::Rackspace.new(attributes)
  else
    raise ArgumentError.new("#{provider} is not a recognized cdn provider")
  end
end

.providersObject



22
23
24
# File 'lib/fog/cdn.rb', line 22

def self.providers
  Fog.services[:cdn]
end