Ruby 2.0 - Rounding an integer to the nearest multiple of 10
Integer#round has the functionality.
You pass a negative number to round
to represent which 10's digit you'd want to round to. For example:
Round to the nearest 10:
55.round(-1) # => 60
To round to the nearest 100:
550.round(-2) # => 600