Dealing Variances in Ruby

Aspose.Tasks - Dealing Variances

To see resource assignment variance using Aspose.Tasks Java for Ruby, simply invoke AssignmentVariance module. Here you can see example code.

Ruby Code

 1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
 2resource_assignments = project.getResourceAssignments().toList()
 3i = 0
 4while i < resource_assignments.size()
 5  assignment = resource_assignments.get(i)
 6  puts "Work Variance: " + assignment.get(Rjb::import('com.aspose.tasks.Asn').WORK_VARIANCE).toString()
 7  puts "Cost Variance: " + assignment.get(Rjb::import('com.aspose.tasks.Asn').COST_VARIANCE).toString()
 8  puts "Start Variance: " + assignment.get(Rjb::import('com.aspose.tasks.Asn').START_VARIANCE).toString()
 9  puts "Finish Variance: " + assignment.get(Rjb::import('com.aspose.tasks.Asn').FINISH_VARIANCE).toString()
10  puts "--------------------------------------------------------"
11  i += 1
12end

Download Running Code

Download Dealing Variances (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.