Class: Fog::Compute::ProfitBricks::Datacenters
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::ProfitBricks::Datacenters
- Includes:
- Helpers::ProfitBricks::DataHelper
- Defined in:
- lib/fog/profitbricks/models/compute/datacenters.rb
Instance Method Summary collapse
Methods included from Helpers::ProfitBricks::DataHelper
Instance Method Details
#all ⇒ Object
11 12 13 14 15 |
# File 'lib/fog/profitbricks/models/compute/datacenters.rb', line 11 def all result = service.get_all_datacenters load(result.body['items'].each { |dc| flatten(dc) }) end |
#get(id) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/fog/profitbricks/models/compute/datacenters.rb', line 17 def get(id) response = service.get_datacenter(id) datacenter = response.body new(flatten(datacenter)) end |