Class: Fog::Compute::Ecloud::Mock
- Inherits:
-
Object
- Object
- Fog::Compute::Ecloud::Mock
- Defined in:
- lib/fog/ecloud/compute.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.
332 333 334 |
# File 'lib/fog/ecloud/compute.rb', line 332 def initialize(={}) @ecloud_api_key = [:ecloud] end |
Class Method Details
.data ⇒ Object
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 |
.reset ⇒ Object
328 329 330 |
# File 'lib/fog/ecloud/compute.rb', line 328 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
336 337 338 |
# File 'lib/fog/ecloud/compute.rb', line 336 def data self.class.data[@ecloud_api_key] end |
#reset_data ⇒ Object
340 341 342 |
# File 'lib/fog/ecloud/compute.rb', line 340 def reset_data self.class.data.delete(@ecloud_api_key) end |