Editing Task Baseline Durations in Ruby
Contents
[
Hide
Show
]Aspose.Tasks - Task Baseline Duration
To get Task Baseline Duration using Aspose.Tasks Java for Ruby, simply invoke TaskBaselineDuration module. Here you can see example code.
Ruby Code
1oneSecond = 10000000
2oneMinute = 60 * oneSecond
3oneHour = 60 * oneMinute
4project = Rjb::import('com.aspose.tasks.Project').new
5task = project.getRootTask().getChildren().add("Task")
6project.setBaseline(Rjb::import('com.aspose.tasks.BaselineType').Baseline)
7baseline = task.getBaselines().toList().get(0)
8duration = baseline.getDuration().toDouble()
9baseline_duration = duration / oneHour
10puts baseline_duration
Download Running Code
Download Task Baseline Duration (Aspose.Tasks) from any of the below mentioned social coding sites: