Permalink
Browse files

set_best for setting options for best counters

  • Loading branch information...
1 parent 0eb0bb8 commit 4672dfc5ed0ad3318d9e582b0f0f84a7f8752846 @blahed committed Jan 30, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/von/config.rb
View
@@ -80,8 +80,10 @@ def set_period(field, period, length)
@periods[field][period.to_sym] = Period.new(field, period, length)
end
- def set_best(field, period)
- @bests[field] = [ period ].flatten
+ def set_best(field, time_unit)
+ @bests[field] = [ time_unit ].flatten.map { |u|
+ Period.new(field, Period::TIME_PERIODS[u])
+ }
end

0 comments on commit 4672dfc

Please sign in to comment.