class Raterr::Hour
Constants
- MINUTES_PER_HOUR
Private Instance Methods
max_per_hour()
click to toggle source
# File lib/raterr/hour.rb, line 10 def max_per_hour options[:max] end
Also aliased as: max_per_period
rate_period()
click to toggle source
# File lib/raterr/hour.rb, line 15 def rate_period start_time + 3600 end
try_after()
click to toggle source
# File lib/raterr/hour.rb, line 19 def try_after "#{MINUTES_PER_HOUR - ((Time.now - start_time) / MINUTES_PER_HOUR).ceil} minutes" end