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