DEV Community

Burdette Lamar
Burdette Lamar

Posted on

2 1

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:

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs