Managing Currency Codes in Ruby

Aspose.Tasks - Getting Currency Code

To get Currency Code using Aspose.Tasks Java for Ruby, call get_currency_code method of CurrencyCodes module. Here you can see example code.

Ruby Code

1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2puts "Currency Code: " + project.get(Rjb::import('com.aspose.tasks.Prj').CURRENCY_CODE).to_string

Aspose.Tasks - Setting Currency Code

To set currency code using Aspose.Tasks Java for Ruby, call set_currency_code method of CurrencyCodes module. Here you can see example code.

1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
2project.set(Rjb::import('com.aspose.tasks.Prj').CURRENCY_CODE, "USD")
3puts "Set currency code."

Download Running Code

Download Managing Currency Codes (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.