Class: Fog::Compute::VcloudDirector::Tasks

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

Instance Method Summary collapse

Methods inherited from Collection

#all, #get_by_name, #get_everyone, #index

Instance Method Details

#get(id) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/fog/vcloud_director/models/compute/tasks.rb', line 12

def get(id)
  data = service.get_task(id).body
  return nil unless data
  data[:id] = data[:href].split('/').last
  data[:progress] ||= 0
  new(data)
end