class TaskJuggler::ShiftScenario
This class handles the scenario specific features of a Shift object.
Public Class Methods
new(resource, scenarioIdx, attributes)
click to toggle source
Calls superclass method
TaskJuggler::ScenarioData.new
# File lib/taskjuggler/ShiftScenario.rb, line 20 def initialize(resource, scenarioIdx, attributes) super end
Public Instance Methods
onLeave?(date)
click to toggle source
Returns true if the shift has a vacation defined for the date.
# File lib/taskjuggler/ShiftScenario.rb, line 34 def onLeave?(date) a('leaves').each do |leave| if leave.interval.contains?(date) return true end end false end
onShift?(date)
click to toggle source
Returns true if the shift has working time defined for the date.
# File lib/taskjuggler/ShiftScenario.rb, line 25 def onShift?(date) a('workinghours').onShift?(date) end
replace?()
click to toggle source
# File lib/taskjuggler/ShiftScenario.rb, line 29 def replace? a('replace') end