<

Majd's Blog

Some Ruby Enumerable Methods

3/20/15

>

This was a simple assigned blog. We were asked just to talk about one enumerable method out of three. So I'm going to go over #group_by.

#group_by takes in an array, creates hash where key is the criteria for how you want it grouped, and the value for the key will be an array of the elements that fit that criteria from the original array.