Read Timephased Data of a Resource in Ruby

Aspose.Tasks - Read Timephased Data of a Resource

To read timephased data of a resource using Aspose.Tasks Java for Ruby, one can simply invoke ReadTimephasedResourceData module. Here you can see example code.

 1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
 2resource = project.getResources().getByUid(1)
 3prj = Rjb::import('com.aspose.tasks.Prj')
 4puts "Timephased data of Resource Work"
 5result = resource.getTimephasedData(project.get(prj.START_DATE), project.get(prj.FINISH_DATE)).toList()
 6i = 0
 7while i < result.size()
 8    td = result.get(i)
 9    puts "Start: " + td.getStart().toString()
10    puts "Work: " + td.getValue()
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.