Module: Datapipes::Composable

Included in:
Sink, Source
Defined in:
lib/datapipes/composable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accumulatedObject

Returns the value of attribute accumulated.



3
4
5
# File 'lib/datapipes/composable.rb', line 3

def accumulated
  @accumulated
end

Instance Method Details

#+(other) ⇒ Object



5
6
7
8
9
# File 'lib/datapipes/composable.rb', line 5

def +(other)
  self.class.new.tap do |o|
    o.accumulated = [self, other] + (accumulated || [])
  end
end