Module: Datapipes::Composable
Instance Attribute Summary collapse
-
#accumulated ⇒ Object
Returns the value of attribute accumulated.
Instance Method Summary collapse
Instance Attribute Details
#accumulated ⇒ Object
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 |