In Files

Class Index [+]

Quicksearch

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 vacations.

Public Class Methods

new(project, id, name, parent) click to toggle source
    # File lib/Shift.rb, line 24
24:     def initialize(project, id, name, parent)
25:       super(project.shifts, id, name, parent)
26:       project.addShift(self)
27: 
28:       @data = Array.new(@project.scenarioCount, nil)
29:       @project.scenarioCount.times do |i|
30:         @data[i] = ShiftScenario.new(self, i, @scenarioAttributes[i])
31:       end
32:     end

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/Shift.rb, line 38
38:     def method_missing(func, scenarioIdx, *args)
39:       @data[scenarioIdx].method(func).call(*args)
40:     end
scenario(scenarioIdx) click to toggle source

Return a reference to the scenarioIdx-th scenario.

    # File lib/Shift.rb, line 43
43:     def scenario(scenarioIdx)
44:       return @data[scenarioIdx]
45:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.