Handling Priorities in Ruby

Aspose.Tasks - Handling Priorities

To Handle Priorities using Aspose.Tasks Java for Ruby, simply invoke HandlingPriorities module. Here you can see example code.

Ruby Code

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

Download Running Code

Download Handling Priorities (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.