5 6 7 8 9 10 11 12 13 14
# File 'lib/roby/task-operations.rb', line 5 def +(task) # !!!! + is NOT commutative if task.null? self elsif self.null? task else Sequence.new << self << task end end
15 16 17 18 19 20 21 22 23
# File 'lib/roby/task-operations.rb', line 15 def |(task) if self.null? task elsif task.null? self else Parallel.new << self << task end end