instance method
Enumerator::Product#each
() { (::Array[Elem]) -> void } -> self
obj.each { |...| ... } → obj
obj.each → enumerator
enumerator.c
View on GitHub ↗
static VALUE
enum_product_each(VALUE obj)
{
RETURN_SIZED_ENUMERATOR(obj, 0, 0, enum_product_enum_size);
return enum_product_run(obj, rb_block_proc());
}
Iterates over the elements of the first enumerable by calling the “each_entry” method on it with the given arguments, then proceeds to the following enumerables in sequence until all of the enumerables are exhausted.
If no block is given, returns an enumerator. Otherwise, returns self.