Tag: Enumerable & Enumerator

Enumerable in Ruby is a core mixin module which adds numerous sequence sorting, searching, filtering, and mapping methods to any class which implements #each.

—     —     —     —     —

An Enumerator takes any method that yields values to a block, and turns it into a lazy, iterable object which supports all the convenient methods of Enumerable.

—     —     —     —     —