Some Ruby code used to solve RubyMonks problems.