RubyKin

Enumerables

The Enumerable module is a collection of built-in Ruby methods that allow you to scan, sort, search and manipulate collections. Remember that collections come in two forms, hashes and arrays. We’ll cover four of the basic enumerables in this chapter:

  • each
  • each_with_index
  • select
  • map