Skip to content

Commit

Permalink
set_best for setting options for best counters
Browse files Browse the repository at this point in the history
  • Loading branch information
trvsdnn committed Jan 30, 2013
1 parent 0eb0bb8 commit 4672dfc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/von/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 4672dfc

Please sign in to comment.