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.

project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
resource = project.getResources().getByUid(1)
prj = Rjb::import('com.aspose.tasks.Prj')
puts "Timephased data of Resource Work"
result = resource.getTimephasedData(project.get(prj.START_DATE), project.get(prj.FINISH_DATE)).toList()
i = 0
while i < result.size()
    td = result.get(i)
    puts "Start: " + td.getStart().toString()
    puts "Work: " + td.getValue()
    i += 1

You can download the working code example from GitHub.