Class: Fog::Linode::Compute::Mock
- Inherits:
-
Object
- Object
- Fog::Linode::Compute::Mock
- Defined in:
- lib/fog/compute/linode.rb
Overview
request :linode_resize request :linode_shutdown request :linode_update
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Mock
constructor
A new instance of Mock.
Constructor Details
#initialize(options = {}) ⇒ Mock
Returns a new instance of Mock.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/fog/compute/linode.rb', line 40 def initialize(={}) unless .delete(:provider) location = caller.first warning = "[yellow][WARN] Fog::Linode::Compute.new is deprecated, use Fog::Compute.new(:provider => 'Linode') instead[/]" warning << " [light_black](" << location << ")[/] " Formatador.display_line(warning) end @linode_api_key = [:linode_api_key] @data = self.class.data[@linode_api_key] end |
Class Method Details
.data ⇒ Object
28 29 30 31 32 |
# File 'lib/fog/compute/linode.rb', line 28 def self.data @data ||= Hash.new do |hash, key| hash[key] = {} end end |
.reset_data(keys = data.keys) ⇒ Object
34 35 36 37 38 |
# File 'lib/fog/compute/linode.rb', line 34 def self.reset_data(keys=data.keys) for key in [*keys] data.delete(key) end end |