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')
 2
 3resource_assignments = project.getResourceAssignments().toList()
 4
 5i = 0
 6
 7while i < resource_assignments.size()
 8
 9  assignment = resource_assignments.get(i)
10
11  puts "Percentage of the Completed Work: " + assignment.get(Rjb::import('com.aspose.tasks.Asn').PERCENT_WORK_COMPLETE).toString()
12
13  puts "--------------------------------------------------------"
14
15  i += 1
16
17end

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.