module Datapipes::Composable
Attributes
accumulated[RW]
Public Instance Methods
+(op2)
click to toggle source
Source
and Sink
can’t composed as function composition. So accumulates composed objects internaly, then use them later.
# File lib/datapipes/composable.rb, line 7 def +(op2) op1 = self op1_acc = (op1.accumulated || [op1]) op2_acc = (op2.accumulated || [op2]) self.class.new.tap do |o| o.accumulated = op1_acc + op2_acc end end