Class: Fog::Compute::Linode::Mock
- Inherits:
-
Object
- Object
- Fog::Compute::Linode::Mock
- Defined in:
- lib/fog/linode/compute.rb
Overview
request :linode_resize
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.
66 67 68 |
# File 'lib/fog/linode/compute.rb', line 66 def initialize(={}) @linode_api_key = [:linode_api_key] end |
Class Method Details
.data ⇒ Object
56 57 58 59 60 |
# File 'lib/fog/linode/compute.rb', line 56 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset ⇒ Object
62 63 64 |
# File 'lib/fog/linode/compute.rb', line 62 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
70 71 72 |
# File 'lib/fog/linode/compute.rb', line 70 def data self.class.data[@linode_api_key] end |
#reset_data ⇒ Object
74 75 76 |
# File 'lib/fog/linode/compute.rb', line 74 def reset_data self.class.data.delete(@linode_api_key) end |