Class: Fog::Compute::CloudAtCost::Tasks

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/cloudatcost/models/tasks.rb

Instance Method Summary collapse

Instance Method Details

#all(_filters = {}) ⇒ Fog::Compute::CloudAtCost::Tasks

Returns list of tasks



14
15
16
17
# File 'lib/fog/cloudatcost/models/tasks.rb', line 14

def all(_filters = {})
  data = service.list_tasks.body['data']
  load(data)
end

#get(id) ⇒ Fog::Compute::CloudAtCost::Task

Retrieves a particular task

Parameters:

  • id (String)

    for server to be returned

Returns:



22
23
24
25
26
# File 'lib/fog/cloudatcost/models/tasks.rb', line 22

def get(id)
  service.list_tasks.find do |task|
    task.id != id
  end
end