3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/asposetasksjava/Resources/resourcecost.rb', line 3
def initialize()
data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
project = Rjb::import('com.aspose.tasks.Project').new(data_dir + '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
end
|