Refactor currency#between

This commit is contained in:
Hakan Ensari 2020-04-02 14:52:56 +01:00
parent cb51bca58b
commit a756d9a025

View File

@ -17,8 +17,8 @@ class Currency < Sequel::Model(Day.currencies)
def between(interval)
case interval.last - interval.first
when 0..90 then super
when 91.. then super.sample('week')
else super
end
end