Class: TaskJuggler::TaskDependency

Inherits:
Object
  • Object
show all
Defined in:
lib/taskjuggler/TaskDependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#gapDurationObject

Returns the value of attribute gapDuration.



18
19
20
# File 'lib/taskjuggler/TaskDependency.rb', line 18

def gapDuration
  @gapDuration
end

#gapLengthObject

Returns the value of attribute gapLength.



18
19
20
# File 'lib/taskjuggler/TaskDependency.rb', line 18

def gapLength
  @gapLength
end

#onEndObject

Returns the value of attribute onEnd.



18
19
20
# File 'lib/taskjuggler/TaskDependency.rb', line 18

def onEnd
  @onEnd
end

#taskObject (readonly)

Returns the value of attribute task.



19
20
21
# File 'lib/taskjuggler/TaskDependency.rb', line 19

def task
  @task
end

#taskIdObject (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