Percentage Complete Calculations in Ruby
Contents
[
Hide
Show
]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')
2
3collector = Rjb::import('com.aspose.tasks.ChildTasksCollector').new
4
5Rjb::import('com.aspose.tasks.TaskUtils').apply(project.getRootTask(), collector, 0)
6
7tsk = Rjb::import('com.aspose.tasks.Tsk')
8
9tasks = collector.getTasks()
10
11i = 0
12
13while i < tasks.size()
14
15 task = tasks.get(i)
16
17 puts task.get(tsk.PERCENT_COMPLETE).toString()
18
19 puts task.get(tsk.PERCENT_WORK_COMPLETE).toString()
20
21 puts task.get(tsk.PHYSICAL_PERCENT_COMPLETE).toString()
22
23 i += 1
24
25end
Download Running Code
Download Percentage Complete Calculations (Aspose.Tasks) from any of the below mentioned social coding sites: