class TaskJuggler::Shift

A shift is a definition of working hours for each day of the week. It may also contain a list of intervals that define off-duty periods or leaves.

Public Class Methods

new(project, id, name, parent) click to toggle source
Calls superclass method
# File lib/taskjuggler/Shift.rb, line 22
def initialize(project, id, name, parent)
  super(project.shifts, id, name, parent)

  @data =, nil)
  @project.scenarioCount.times do |i|, i, @scenarioAttributes[i])

Public Instance Methods

method_missing(func, scenarioIdx, *args) click to toggle source

Many Shift functions are scenario specific. These functions are provided by the class ShiftScenario. In case we can't find a function called for the Shift class we try to find it in ShiftScenario.

# File lib/taskjuggler/Shift.rb, line 36
def method_missing(func, scenarioIdx, *args)
scenario(scenarioIdx) click to toggle source

Return a reference to the scenarioIdx-th scenario.

# File lib/taskjuggler/Shift.rb, line 41
def scenario(scenarioIdx)
  return @data[scenarioIdx]