| Class | TaskJuggler::Leave |
| In: |
lib/taskjuggler/LeaveList.rb
|
| Parent: | Object |
| Types | = | { :project => 1, :annual => 2, :special => 3, :sick => 4, :unpaid => 5, :holiday => 6 | This Hash defines the supported leave types. It maps the symbol to its index. The index sequence is important when multiple leaves are defined for the same time slot. A subsequent definition with a type with a larger index will override the old leave type. |
| interval | [R] | |
| reason | [R] | |
| type | [R] |
Create a new Leave object. interval should be an Interval describing the leave period. type must be one of the supported leave types (:holiday, :annual, :special, :unpaid, :sick and :project ). The reason is an optional String that describes the leave reason.
# File lib/taskjuggler/LeaveList.rb, line 38 def initialize(type, interval, reason = nil) unless Types[type] raise ArgumentError, "Unsupported leave type #{type}" end @type = type @interval = interval @reason = reason end