Class: Fog::Compute::ProfitBricks::Datacenters
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::ProfitBricks::Datacenters
- Defined in:
- lib/fog/compute/profit_bricks/models/datacenters.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
9 10 11 |
# File 'lib/fog/compute/profit_bricks/models/datacenters.rb', line 9 def all load(service.get_all_data_centers.body["getAllDataCentersResponse"]) end |
#get(id) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/fog/compute/profit_bricks/models/datacenters.rb', line 13 def get(id) datacenter = service.get_data_center(id).body["getDataCenterResponse"] Excon::Errors new(datacenter) rescue Excon::Errors::NotFound nil end |