DEV Community

Burdette Lamar
Burdette Lamar

Posted on

Ruby Module Enumerable Is Your Hidden Friend

It's easy to forget that a class in the Ruby core and standard library may "mix in" a module by including or extending it.

The automatically-generated documentation has a linked mention of the inclusion ("Included Modules: Enumerable"), but that's it.

For an including class that has a "What's Here" section (my handiwork, btw!), there's a slightly heftier mention. In Array, for example, there's this linked mention: "Includes module Enumerable, which provides dozens of additional methods."

It may be good to know:

Top comments (0)