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.
330 331 332 |
# File 'lib/fog/ecloud/compute.rb', line 330 def initialize(={}) @ecloud_api_key = [:ecloud] end |
Class Method Details
.data ⇒ Object
320 321 322 323 324 |
# File 'lib/fog/ecloud/compute.rb', line 320 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset ⇒ Object
326 327 328 |
# File 'lib/fog/ecloud/compute.rb', line 326 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
334 335 336 |
# File 'lib/fog/ecloud/compute.rb', line 334 def data self.class.data[@ecloud_api_key] end |
#reset_data ⇒ Object
338 339 340 |
# File 'lib/fog/ecloud/compute.rb', line 338 def reset_data self.class.data.delete(@ecloud_api_key) end |