Stefan Tilkov's Random Stuff

An Introduction to Ruby's Enumerable Module

James Golick:

Enumerable’s biggest advantage over the for loop, as we’ve seen, is clarity. Using Enumerable’s looping power tools, like any?, all?, and friends makes your code read semantically. Especially combined with Symbol#to_proc, code “…seems to describe what I want done instead of how I want the computer to do it.”, to quote Raganwald.