Articles on enumerator

Purple waves
Jared Carroll

Jared Carroll

Enumerator: Ruby’s Versatile Iterator

The classic iterator pattern describes a way of accessing the elements of an aggregate object without exposing its implementation. This pattern comes in two flavors: external and internal. An external iterator is controlled by the client, while an internal iterator is controlled by the aggregate object. In Ruby, internal iteration is the norm. Ruby’s Enumerable