number = 1.1164 number.round(2) Or sprintf('%.2f', number)
sprintf('%.2f', 53) # => "53.00"
1.23.modulo(1) => 0.23