Retrieve a Task's Budget Work and Cost Values in Ruby

Aspose.Tasks - Retrieve a Task’s Budget Work and Cost Values

To Retrieve a Task’s Budget Work and Cost Values using Aspose.Tasks Java for Ruby, simply invoke GetBudgetWorkAndCostValue module. Here you can see example code.

Ruby Code

 1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
 2
 3project_summary = project.getRootTask()
 4
 5tsk = Rjb::import('com.aspose.tasks.Tsk')
 6
 7rsc = Rjb::import('com.aspose.tasks.Rsc')
 8
 9puts "Project Budget Work = " + project_summary.get(tsk.BUDGET_WORK).to_string
10
11puts "Project Budget Cost = " + project_summary.get(tsk.BUDGET_COST).to_string
12
13resource = project.getResources().getByUid(1)
14
15puts "Resource BudgetWork = " + resource.get(rsc.BUDGET_WORK).to_string
16
17resource = project.getResources().getByUid(2)
18
19puts "Resource BudgetCost = " + resource.get(rsc.BUDGET_COST).to_string

Download Running Code

Download Retrieve a Task’s Budget Work and Cost Values (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.