This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.

An Introduction to Ruby's Enumerable Module

Stefan Tilkov,

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.