Class: Fog::CDN::AWS::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/cdn/aws.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



34
35
36
37
38
# File 'lib/fog/cdn/aws.rb', line 34

def initialize(options={})
  require 'mime/types'
  @aws_access_key_id  = options[:aws_access_key_id]
  @region             = options[:region]
end

Class Method Details

.dataObject



20
21
22
23
24
25
26
27
28
# File 'lib/fog/cdn/aws.rb', line 20

def self.data
  @data ||= Hash.new do |hash, region|
    hash[region] = Hash.new do |region_hash, key|
      region_hash[key] = {
        :buckets => {}
      }
    end
  end
end

.resetObject



30
31
32
# File 'lib/fog/cdn/aws.rb', line 30

def self.reset
  @data = nil
end

Instance Method Details

#dataObject



40
41
42
# File 'lib/fog/cdn/aws.rb', line 40

def data
  self.class.data[@region][@aws_access_key_id]
end

#reset_dataObject



44
45
46
# File 'lib/fog/cdn/aws.rb', line 44

def reset_data
  self.class.data[@region].delete(@aws_access_key_id)
end

#signature(params) ⇒ Object



48
49
50
# File 'lib/fog/cdn/aws.rb', line 48

def signature(params)
  "foo"
end