Class: Fog::Compute::Ecloud::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/ecloud/compute.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



332
333
334
# File 'lib/fog/ecloud/compute.rb', line 332

def initialize(options={})
  @ecloud_api_key = options[:ecloud]
end

Class Method Details

.dataObject



322
323
324
325
326
# File 'lib/fog/ecloud/compute.rb', line 322

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.resetObject



328
329
330
# File 'lib/fog/ecloud/compute.rb', line 328

def self.reset
  @data = nil
end

Instance Method Details

#dataObject



336
337
338
# File 'lib/fog/ecloud/compute.rb', line 336

def data
  self.class.data[@ecloud_api_key]
end

#reset_dataObject



340
341
342
# File 'lib/fog/ecloud/compute.rb', line 340

def reset_data
  self.class.data.delete(@ecloud_api_key)
end