Sha256: baf516612a6caf68054926117986e8e013a99021d6b2b76a1a791226c9339dd2

Contents?: true

Size: 897 Bytes

Versions: 1

Compression:

Stored size: 897 Bytes

Contents

module Asposetasksjava
  module ResourceCost
    def initialize()
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Instantiate project object
        project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'project.mpp')

		resources = project.getResources().toList()

		rsc = Rjb::import('com.aspose.tasks.Rsc')

		# Parse through all the collected tasks
		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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
asposetasksjava-0.0.1 lib/asposetasksjava/Resources/resourcecost.rb