Working with Actual Properties in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Getting Actual Properties
To get Actual Properties using Aspose.Tasks Java for Ruby, call get_actual_properties method of TasksProperties module. Here you can see example code.
Ruby Code
1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2
3collector = Rjb::import('com.aspose.tasks.ChildTasksCollector').new
4
5Rjb::import('com.aspose.tasks.TaskUtils').apply(project.getRootTask(), collector, 0)
6
7tasks = collector.getTasks()
8
9tsk = Rjb::import('com.aspose.tasks.Tsk')
10
11i = 0
12
13while i < tasks.size()
14
15 task = tasks.get(i)
16
17 puts "Task Name : " + task.get(tsk.NAME).to_string
18
19 puts "Actual Start: " + task.get(tsk.ACTUAL_START).toString()
20
21 puts "Actual Finish: " + task.get(tsk.ACTUAL_FINISH).toString()
22
23 puts "Actual Duration: " + task.get(tsk.ACTUAL_DURATION).toString()
24
25 puts "Actual Cost: " + task.get(tsk.ACTUAL_COST).toString()
26
27 puts "---------------------------------------------"
28
29 i += 1
30
31end
Download Running Code
Download General Properties (Aspose.Tasks) from any of the below mentioned social coding sites: