Class: Fog::Compute::Joyent::Datacenters

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/joyent/models/compute/datacenters.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
# File 'lib/fog/joyent/models/compute/datacenters.rb', line 10

def all
  data = service.list_datacenters().body.map {|k,v| {:name => k, :url => v}}
  load(data)
end

#get(id) ⇒ Object



15
16
17
# File 'lib/fog/joyent/models/compute/datacenters.rb', line 15

def get(id)
  all[id]
end