Tag Archives: proc

Shorten Map and Each Commands

Or: Pithy Procs for Working with Enumerables Typing out code blocks every time you want to use map or each is a bit of a pain, and often unnecessary. You may know that (1..5).map { |n| n.to_s }  can be rewritten as  (1..5).map &:to_s. But what … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment