Methods
Included Modules
Class Public methods
new(*enums)
Link
Creates a new SyncEnumerator which enumerates rows of given Enumerable objects.
Source: show
# File lib/rexml/syncenumerator.rb, line 7 def initialize(*enums) @gens = enums @length = @gens.collect {|x| x.size }.max end
Instance Public methods
each()
Link
Enumerates rows of the Enumerable objects.
Source: show
# File lib/rexml/syncenumerator.rb, line 25 def each @length.times {|i| yield @gens.collect {|x| x[i]} } self end
length()
Link
Returns the number of enumerated Enumerable objects, i.e. the size of each row.
Source: show
# File lib/rexml/syncenumerator.rb, line 20 def length @gens.length end
size()
Link
Returns the number of enumerated Enumerable objects, i.e. the size of each row.
Source: show
# File lib/rexml/syncenumerator.rb, line 14 def size @gens.size end