— — — — —
— — — — —
In this episode we take some already-good code and make it even better.
Queue, somewhat surprisingly, is not enumerable. Which is all the excuse we need to have some more fun with the Enumerator class, in today's episode.
A number of Ruby standard library methods return an Enumerator if no block is passed to them. In this episode, we'll learn how to emulate this behavior in our own …
In this episode we'll explore Ruby's lightweight concurrency primitive by using it to emulate the Enumerator class.
Now that we've been formally introduced to the Enumerator class, it's time to apply that knowledge in a concrete way. In this episode we use Pathname and Enumerator to locate …
In previous episodes we've touched on Enumerator in passing. This time it'll take center stage, as we explore just what an Enumerator is and what it's good for.
Somtetimes you need to know if exactly one element in a collection has a given property. For that situation, we have the #one? predicate method.
Does code optimized for RAM usage need to be ugly? Find out, in today's episode!