How to use sort_by to sort by multiple parameters in Ruby

Ruby's #sort_by method is powerful, but it can be difficult to figure out how it works at first, especially when you want to sort by »