From 59a8a28ddb71e1e79c7a31dd04201adee9ac21a1 Mon Sep 17 00:00:00 2001 From: Hakan Ensari Date: Fri, 23 Nov 2012 15:11:00 +0000 Subject: [PATCH] Fix Snapshot#round --- lib/snapshot.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/snapshot.rb b/lib/snapshot.rb index f51337e..b2c1613 100644 --- a/lib/snapshot.rb +++ b/lib/snapshot.rb @@ -37,10 +37,9 @@ class Snapshot end def round(rate) - case rate - when rate > 100 + if rate > 100 rate.round 2 - when rate > 10 + elsif rate > 10 rate.round 3 else rate.round 4