Percentage Complete Calculations in Ruby

Aspose.Tasks - Percentage Complete Calculations

To get Complete Percentage Calculations using Aspose.Tasks Java for Ruby, simply invoke TasksPercentage module. Here you can see example code.

Ruby Code

 1project = Rjb::import('com.aspose.tasks.Project').new('project.mpp')
 2collector = Rjb::import('com.aspose.tasks.ChildTasksCollector').new
 3Rjb::import('com.aspose.tasks.TaskUtils').apply(project.getRootTask(), collector, 0)
 4tsk = Rjb::import('com.aspose.tasks.Tsk')
 5tasks = collector.getTasks()
 6i = 0
 7while i < tasks.size()
 8  task = tasks.get(i)
 9  puts task.get(tsk.PERCENT_COMPLETE).toString()
10  puts task.get(tsk.PERCENT_WORK_COMPLETE).toString()
11  puts task.get(tsk.PHYSICAL_PERCENT_COMPLETE).toString()
12  i += 1
13end

Download Running Code

Download Percentage Complete Calculations (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.