Method: J8::Stream.concat
- Defined in:
- lib/j8/stream.rb
.concat(stream1, stream2) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/j8/stream.rb', line 13 def self.concat(stream1, stream2) J8::Stream.new( Enumerator.new do |enumerator| [stream1, stream2].each do |stream| stream.enumerator.each { |o| enumerator << o } end end ) end |