mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 11:02:30 +01:00
Refactor rounding
This commit is contained in:
parent
15e8d8b19b
commit
af13a6324a
@ -62,10 +62,6 @@ class Quote
|
||||
|
||||
# I'm mimicking the apparent convention of the ECB here.
|
||||
def round_rate(rate)
|
||||
if rate > 100
|
||||
rate.round(2)
|
||||
else
|
||||
Float("%.#{5}g" % rate)
|
||||
end
|
||||
Float("%.#{5}g" % rate)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user