Refactor rounding

This commit is contained in:
Hakan Ensari 2015-09-02 22:13:53 +01:00
parent 15e8d8b19b
commit af13a6324a

View File

@ -62,10 +62,6 @@ class Quote
# I'm mimicking the apparent convention of the ECB here. # I'm mimicking the apparent convention of the ECB here.
def round_rate(rate) def round_rate(rate)
if rate > 100 Float("%.#{5}g" % rate)
rate.round(2)
else
Float("%.#{5}g" % rate)
end
end end
end end