Ruby 2.0 - Rounding an integer to the nearest multiple of 10

Viewed 13014

How do i round an integer to the nearest multiple of ten?

I have tried integer.round(0.1) but it gives the nearest decimal number.

Example: 3 should return 0, 55 should return 60.

Is there a method that will round to the nearest multiple of 10?

2 Answers
Related