mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 02:52:49 +01:00
Refactor currency#between
This commit is contained in:
parent
cb51bca58b
commit
a756d9a025
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user