Class: TaskJuggler::TaskDependency
- Defined in:
- lib/taskjuggler/TaskDependency.rb
Instance Attribute Summary collapse
-
#gapDuration ⇒ Object
Returns the value of attribute gapDuration.
-
#gapLength ⇒ Object
Returns the value of attribute gapLength.
-
#onEnd ⇒ Object
Returns the value of attribute onEnd.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
-
#taskId ⇒ Object
readonly
Returns the value of attribute taskId.
Instance Method Summary collapse
- #==(dep) ⇒ Object
-
#initialize(taskId, onEnd) ⇒ TaskDependency
constructor
A new instance of TaskDependency.
- #resolve(project) ⇒ Object
Constructor Details
#initialize(taskId, onEnd) ⇒ TaskDependency
Returns a new instance of TaskDependency.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/taskjuggler/TaskDependency.rb', line 21 def initialize(taskId, onEnd) @taskId = taskId @task = nil # Specifies whether the dependency is relative to the start or the # end of the dependent task. @onEnd = onEnd # The gap duration is stored in seconds of calendar time. @gapDuration = 0 # The gap length is stored in number of scheduling slots. @gapLength = 0 end |
Instance Attribute Details
#gapDuration ⇒ Object
Returns the value of attribute gapDuration.
18 19 20 |
# File 'lib/taskjuggler/TaskDependency.rb', line 18 def gapDuration @gapDuration end |
#gapLength ⇒ Object
Returns the value of attribute gapLength.
18 19 20 |
# File 'lib/taskjuggler/TaskDependency.rb', line 18 def gapLength @gapLength end |
#onEnd ⇒ Object
Returns the value of attribute onEnd.
18 19 20 |
# File 'lib/taskjuggler/TaskDependency.rb', line 18 def onEnd @onEnd end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
19 20 21 |
# File 'lib/taskjuggler/TaskDependency.rb', line 19 def task @task end |
#taskId ⇒ Object (readonly)
Returns the value of attribute taskId.
19 20 21 |
# File 'lib/taskjuggler/TaskDependency.rb', line 19 def taskId @taskId end |
Instance Method Details
#==(dep) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/taskjuggler/TaskDependency.rb', line 33 def ==(dep) @taskId == dep.taskId && @task == dep.task && @onEnd == dep.onEnd && @gapDuration == dep.gapDuration && @gapLength == dep.gapLength end |
#resolve(project) ⇒ Object
41 42 43 |
# File 'lib/taskjuggler/TaskDependency.rb', line 41 def resolve(project) @task = project.task(@taskId) end |