Class: Fog::Compute::Gridscale::Locations

Inherits:
PagingCollection show all
Defined in:
lib/fog/compute/gridscale/models/locations.rb

Instance Method Summary collapse

Methods inherited from PagingCollection

#next_page, #previous_page

Instance Method Details

#all(filters = {}) ⇒ Object



10
11
12
13
14
# File 'lib/fog/compute/gridscale/models/locations.rb', line 10

def all(filters={})
  data = service.locations_get(filters)
  droplets = data.body["locations"].values
  load(droplets)
end

#get(object_uuid) ⇒ Object



16
17
18
19
20
21
# File 'lib/fog/compute/gridscale/models/locations.rb', line 16

def get(object_uuid)
  location = service.location_get(object_uuid).body
  new(location) if location
rescue Fog::Errors::NotFound
  nil
end