class Raterr::Day

Constants

HOURS_PER_DAY

Private Instance Methods

max_per_day() click to toggle source
# File lib/raterr/day.rb, line 10
def max_per_day
  options[:max]
end
Also aliased as: max_per_period
max_per_period()
Alias for: max_per_day
rate_period() click to toggle source
# File lib/raterr/day.rb, line 15
def rate_period
  start_time + 3600 * HOURS_PER_DAY
end
try_after() click to toggle source
# File lib/raterr/day.rb, line 19
def try_after
  "#{HOURS_PER_DAY - ((Time.now - start_time) / 3600).ceil} hours"
end