Calculating Percentages in Ruby

Aspose.Tasks - Calculating Percentages

To Calculate Percentage of the completed work using Aspose.Tasks Java for Ruby, simply invoke AssignmentPercentWorkComplete 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 "Percentage of the Completed Work: " + assignment.get(Rjb::import('com.aspose.tasks.Asn').PERCENT_WORK_COMPLETE).toString()
7  puts "--------------------------------------------------------"
8  i += 1
9end

Download Running Code

Download Calculating Percentages (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.