1 note &
SyncEnumerator in ruby
SyncEnumerator creates anĀ Enumerable object from multipleĀ Enumerable objects and enumerates them synchronously
Example
require 'generator'
s = SyncEnumerator.new([1,2,3], ['a', 'b', 'c'])
# Yields [1, 'a'], [2, 'b'], and [3,'c']
s.each { |row| puts row.join(', ') }