alliejones/makefolio — pull request #1 by rcjara (2013-02-21 17:07:00+00:00)
Title: Just a few idiomatic ruby changes.

a0992a5 Change class variable to constant

Just makes it a little clearer that you aren't expecting the regular expression to ever change.

0e85cd4 Change an each call with shoveling into an array to a map call

This is just more idiomatic ruby, so it will be a little clearer to ruby-ists. It's also fewer lines of code, so score. Plus, when you get into the habit of using map, filter, etc. it becomes really easy to chain those methods together, e.g.:

(1..100).filter { |x| x.even? }
.map { |x| x * 3 }
.inject(0) { |sum, x| sum + x }

The above takes all the even numbers from 1 to 100, multiplies them, and then sums them. You can chain stuff like that together as much as you want.

c23f26b Change map! to map

I don't think it really made a difference in this case, but I've gotten into trouble using bang methods before. I think it's good style to avoid them if you can.