Module: Asposetasksjava::RemoveCalendarException
- Defined in:
- lib/asposetasksjava/Calendars/removecalendarexception.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/asposetasksjava/Calendars/removecalendarexception.rb', line 3 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 + 'test_tasks.mpp') # Remove an exception cal = project.getCalendars().toList().get(0) if cal.getExceptions().getCount() > 1 exc = cal.getExceptions().toList().get(0) cal.getExceptions().remove(exc) puts "Removed calendar exception." end end |