class TaskJuggler::ShiftScenario
This class handles the scenario specific features of a Shift
object.
Public Class Methods
Source
# File lib/taskjuggler/ShiftScenario.rb, line 22 def initialize(resource, scenarioIdx, attributes) super end
Calls superclass method
TaskJuggler::ScenarioData::new
Public Instance Methods
Source
# File lib/taskjuggler/ShiftScenario.rb, line 36 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 a vacation defined for the date.
Source
# File lib/taskjuggler/ShiftScenario.rb, line 27 def onShift?(date) a('workinghours').onShift?(date) end
Returns true if the shift has working time defined for the date.