Module: Throttle
- Defined in:
- lib/throttle.rb,
lib/throttle/version.rb,
lib/throttle/time_window/runner.rb
Defined Under Namespace
Modules: TimeWindow
Constant Summary collapse
- HOUR_SECONDS =
3600- DAYS_SECONDS =
24 * HOUR_SECONDS
- VERSION =
"0.0.1".freeze
Class Method Summary collapse
Class Method Details
.per_day(count) ⇒ Object
13 14 15 |
# File 'lib/throttle.rb', line 13 def self.per_day(count) TimeWindow::Runner.new(DAYS_SECONDS, count) end |
.per_hour(count) ⇒ Object
9 10 11 |
# File 'lib/throttle.rb', line 9 def self.per_hour(count) TimeWindow::Runner.new(HOUR_SECONDS, count) end |