Class | REXML::SyncEnumerator
In: | rexml/syncenumerator.rb
Parent: | Object

### Methods

each length new size

### Included Modules

Enumerable

### Public Class methods

new(*enums)

Creates a new SyncEnumerator which enumerates rows of given Enumerable objects.

[Source]

    # File rexml/syncenumerator.rb, line 7
        def initialize(*enums)
          @gens = enums
          @biggest = @gens[0]
          @gens.each {|x| @biggest = x if x.size > @biggest.size }
        end

### Public Instance methods

each() {|*a[1..-1]| ...}

Enumerates rows of the Enumerable objects.

[Source]

    # File rexml/syncenumerator.rb, line 26
        def each
          @biggest.zip( *@gens ) {|a|
            yield(*a[1..-1])
          }
          self
        end

length()

Returns the number of enumerated Enumerable objects, i.e. the size of each row.

[Source]

    # File rexml/syncenumerator.rb, line 21
        def length
          @gens.length
        end

size()

Returns the number of enumerated Enumerable objects, i.e. the size of each row.

[Source]

    # File rexml/syncenumerator.rb, line 15
        def size
          @gens.size
        end

[Validate]