This class handles the scenario specific features of a Shift object.
# File lib/taskjuggler/ShiftScenario.rb, line 19 def initialize(resource, scenarioIdx, attributes) super end
Returns true if the shift has a vacation defined for the date.
# File lib/taskjuggler/ShiftScenario.rb, line 33 def onLeave?(date) a('leaves').each do |leave| if leave.interval.contains?(date) return true end end false end
Returns true if the shift has working time defined for the date.
# File lib/taskjuggler/ShiftScenario.rb, line 24 def onShift?(date) a('workinghours').onShift?(date) end
# File lib/taskjuggler/ShiftScenario.rb, line 28 def replace? a('replace') end