Think In Geek

In geek we trust

October, 2011

Iterate over a collection in groups, and other things

One thing I find fascinating about Ruby is the fact that most common tasks are already programmed for you in its library. The Enumerable module is a clear example of that, providing you with lots of functionality to manipulate collections of objects. One of those useful methods I discovered the other day was each_slice. This […]

, ,