Class: Fog::Compute::Gridscale::Mock
- Inherits:
-
Object
- Object
- Fog::Compute::Gridscale::Mock
- Defined in:
- lib/fog/compute/gridscale.rb
Class Method Summary collapse
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
- #reset_data ⇒ Object
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(={}) @api_token = [:api_token] @user_uuid = [:user_uuid] end |
Class Method Details
.data ⇒ Object
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
#data ⇒ Object
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_data ⇒ Object
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 |