method

new

ruby latest stable - Class: Enumerator::Chain

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

new(*args)
public

Generates a new enumerator object that iterates over the elements of given enumerable objects in sequence.

e = Enumerator::Chain.new(1..3, [4, 5])
e.to_a #=> [1, 2, 3, 4, 5]
e.size #=> 5