Class: Fog::Compute::Cloudstack::Mock
- Inherits:
-
Object
- Object
- Fog::Compute::Cloudstack::Mock
- Defined in:
- lib/fog/cloudstack/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.
121 122 123 |
# File 'lib/fog/cloudstack/compute.rb', line 121 def initialize(={}) @cloudstack_api_key = [:cloudstack_api_key] end |
Class Method Details
.data ⇒ Object
111 112 113 114 115 |
# File 'lib/fog/cloudstack/compute.rb', line 111 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset ⇒ Object
117 118 119 |
# File 'lib/fog/cloudstack/compute.rb', line 117 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
125 126 127 |
# File 'lib/fog/cloudstack/compute.rb', line 125 def data self.class.data[@cloudstack_api_key] end |
#reset_data ⇒ Object
129 130 131 |
# File 'lib/fog/cloudstack/compute.rb', line 129 def reset_data self.class.data.delete(@cloudstack_api_key) end |