Resource Cost in Ruby

Aspose.Tasks - Resource Cost

To get Resource Cost using Aspose.Tasks Java for Ruby, simply invoke ResourceCost module. Here you can see example code.

project = Rjb::import('com.aspose.tasks.Project').new('project.mpp')
resources = project.getResources().toList()
rsc = Rjb::import('com.aspose.tasks.Rsc')
i = 0
while i < resources.size()
    resource = resources.get(i)
    if resource.get(rsc.NAME) != nil
      puts "Cost: " + resource.get(rsc.COST).to_string
      puts "ACWP: " + resource.get(rsc.ACWP).to_string
      puts "BCWS: " + resource.get(rsc.BCWS).to_string
      puts "BCWP: " + resource.get(rsc.BCWP).to_string
      puts "---------------------------------------------"
    end
    i += 1
end

Download Running Code

Download Resource Cost (Aspose.Tasks) from any of the below mentioned social coding sites: