Class: Fog::CDN::AWS::Mock
- Inherits:
-
Object
- Object
- Fog::CDN::AWS::Mock
- Defined in:
- lib/fog/cdn/aws.rb
Class Method Summary collapse
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reset_data ⇒ Object
- #signature(params) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
40 41 42 43 44 |
# File 'lib/fog/cdn/aws.rb', line 40 def initialize(={}) require 'mime/types' @aws_access_key_id = [:aws_access_key_id] @region = [:region] end |
Class Method Details
.data ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/cdn/aws.rb', line 26 def self.data @data ||= Hash.new do |hash, region| hash[region] = Hash.new do |region_hash, key| region_hash[key] = { :buckets => {} } end end end |
.reset ⇒ Object
36 37 38 |
# File 'lib/fog/cdn/aws.rb', line 36 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
46 47 48 |
# File 'lib/fog/cdn/aws.rb', line 46 def data self.class.data[@region][@aws_access_key_id] end |
#reset_data ⇒ Object
50 51 52 |
# File 'lib/fog/cdn/aws.rb', line 50 def reset_data self.class.data[@region].delete(@aws_access_key_id) end |
#signature(params) ⇒ Object
54 55 56 |
# File 'lib/fog/cdn/aws.rb', line 54 def signature(params) "foo" end |