Class: Fog::Compute::Glesys::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/rackspace-fog/glesys/compute.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



40
41
42
43
44
45
# File 'lib/rackspace-fog/glesys/compute.rb', line 40

def initialize(options={})
  @api_url            = options[:glesys_api_url] || Fog.credentials[:glesys_api_url] || API_URL
  @glesys_username    = options[:glesys_username] || Fog.credentials[:glesys_api_key]
  @glesys_api_key     = options[:glesys_api_key] || Fog.credentials[:glesys_api_key]
  @connection_options = options[:connection_options] || {}
end

Class Method Details

.dataObject



47
48
49
50
# File 'lib/rackspace-fog/glesys/compute.rb', line 47

def self.data
  @data ||= {
  }
end

.resetObject



52
53
54
# File 'lib/rackspace-fog/glesys/compute.rb', line 52

def self.reset
  @data = nil
end

Instance Method Details

#dataObject



56
57
58
# File 'lib/rackspace-fog/glesys/compute.rb', line 56

def data
  self.class.data
end

#reset_dataObject



60
61
62
# File 'lib/rackspace-fog/glesys/compute.rb', line 60

def reset_data
  self.class.reset
end