Class: Fog::Compute::Gridscale::Mock

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



266
267
268
269
270
# File 'lib/fog/compute/gridscale.rb', line 266

def initialize(options={})
  @api_token = options[:api_token]
  @user_uuid = options[:user_uuid]

end

Class Method Details

.dataObject



257
258
259
260
261
262
263
264
# File 'lib/fog/compute/gridscale.rb', line 257

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {
        :storage  => [],
        # :ssh_keys => []
    }
  end
end

Instance Method Details

#dataObject



272
273
274
275
# File 'lib/fog/compute/gridscale.rb', line 272

def data
  self.class.data[@api_token]
  self.class.data[@user_uuid]
end

#reset_dataObject



277
278
279
280
# File 'lib/fog/compute/gridscale.rb', line 277

def reset_data
  self.class.data.delete(@api_token)
  self.class.data.delete(@user_uuid)
end