WBS Associated with a Task in Ruby

Aspose.Tasks - WBS Associated with a Task

To WBS Associated with a Task using Aspose.Tasks Java for Ruby, simply invoke WBSAssociatedWithTask 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)
 4tsk = Rjb::import('com.aspose.tasks.Tsk')
 5tasks = collector.getTasks()
 6i = 0
 7while i < tasks.size()
 8    task = tasks.get(i)
 9    puts "WBS: " + task.get(tsk.WBS).to_string
10    puts "WBS Level: " + task.get(tsk.WBS_LEVEL).to_s
11    i += 1
12end

You can download the working code example from GitHub.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.