Class: Fog::Compute::Glesys::Mock
- Inherits:
-
Object
- Object
- Fog::Compute::Glesys::Mock
- Defined in:
- lib/fog/glesys/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.
44 45 46 47 48 49 |
# File 'lib/fog/glesys/compute.rb', line 44 def initialize(={}) @api_url = [:glesys_api_url] || Fog.credentials[:glesys_api_url] || API_URL @glesys_username = [:glesys_username] || Fog.credentials[:glesys_api_key] @glesys_api_key = [:glesys_api_key] || Fog.credentials[:glesys_api_key] @connection_options = [:connection_options] || {} end |
Class Method Details
.data ⇒ Object
51 52 53 54 |
# File 'lib/fog/glesys/compute.rb', line 51 def self.data @data ||= { } end |
.reset ⇒ Object
56 57 58 |
# File 'lib/fog/glesys/compute.rb', line 56 def self.reset @data = nil end |
Instance Method Details
#data ⇒ Object
60 61 62 |
# File 'lib/fog/glesys/compute.rb', line 60 def data self.class.data end |
#reset_data ⇒ Object
64 65 66 |
# File 'lib/fog/glesys/compute.rb', line 64 def reset_data self.class.reset end |