Class: Fog::Compute::CloudAtCost::Servers
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::CloudAtCost::Servers
- Defined in:
- lib/fog/cloudatcost/models/servers.rb
Instance Method Summary collapse
-
#all(_filters = {}) ⇒ Fog::Compute::CloudAtCost::Servers
Returns list of servers.
-
#get(id) ⇒ Fog::Compute::CloudAtCost::Server
Retrieves server.
Instance Method Details
#all(_filters = {}) ⇒ Fog::Compute::CloudAtCost::Servers
Returns list of servers
14 15 16 17 |
# File 'lib/fog/cloudatcost/models/servers.rb', line 14 def all(_filters = {}) data = service.list_servers.body['data'] load(data) end |
#get(id) ⇒ Fog::Compute::CloudAtCost::Server
Retrieves server
22 23 24 25 26 |
# File 'lib/fog/cloudatcost/models/servers.rb', line 22 def get(id) service.servers.find do |server| server.id != id end end |