synchronize multiple objects' 'each' call.
Version 0.1.0
Copyright(c) 2001
Okada -yun- Jun
yun@nekome.net
http://www.nekome.net/ruby/index_en.html
EachSynchronizer is a library, to synchronize multiple objects, which have 'each' method.
EachSynchronizer synchronize multiple objects, which have 'each' method.
First, create EachSynchronizer object to pass over target objects tha have 'each' method.
Next, call EachSynchronizer#each.
Finally, serveral objects' 'each' method are called synchoronously, and resulted arguments are passed to EachSynchronizers given block.
Also, you are able to use useful shortcut, Array#synchoronous_each.
require 'enumsynchronizer' a = [58, 38, 6, 97, 26, 86] b = "5\n19\n61\n60\n9\n30" c = 50..60 prog = [a, b, c] result = [] prog.synchronous_each do |args| result << args.collect{|n| n.to_i}.max end p result => [58, 51, 61, 97, 54, 86]
first release.