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

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



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

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

Class Method Details

.dataObject



29
30
31
32
33
34
35
36
37
# File 'lib/fog/aws/cdn.rb', line 29

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



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

def self.reset
  @data = nil
end

Instance Method Details

#dataObject



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

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

#reset_dataObject



53
54
55
# File 'lib/fog/aws/cdn.rb', line 53

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

#signature(params) ⇒ Object



57
58
59
# File 'lib/fog/aws/cdn.rb', line 57

def signature(params)
  "foo"
end