Class TaskJuggler::ShiftScenario
In: lib/taskjuggler/ShiftScenario.rb
Parent: ScenarioData

This class handles the scenario specific features of a Shift object.

Methods

new   onLeave?   onShift?   replace?  

Public Class methods

[Source]

# File lib/taskjuggler/ShiftScenario.rb, line 21
    def initialize(resource, scenarioIdx, attributes)
      super
    end

Public Instance methods

Returns true if the shift has a vacation defined for the date.

[Source]

# File lib/taskjuggler/ShiftScenario.rb, line 35
    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.

[Source]

# File lib/taskjuggler/ShiftScenario.rb, line 26
    def onShift?(date)
      a('workinghours').onShift?(date)
    end

[Source]

# File lib/taskjuggler/ShiftScenario.rb, line 30
    def replace?
      a('replace')
    end

[Validate]