Class: RateLimit::Limit
- Inherits:
-
Object
- Object
- RateLimit::Limit
- Defined in:
- lib/rate_limit/limit.rb
Instance Attribute Summary collapse
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(threshold, interval) ⇒ Limit
constructor
A new instance of Limit.
Constructor Details
#initialize(threshold, interval) ⇒ Limit
Returns a new instance of Limit.
7 8 9 10 |
# File 'lib/rate_limit/limit.rb', line 7 def initialize(threshold, interval) @threshold = threshold @interval = interval end |
Instance Attribute Details
#interval ⇒ Object
Returns the value of attribute interval.
5 6 7 |
# File 'lib/rate_limit/limit.rb', line 5 def interval @interval end |
#threshold ⇒ Object
Returns the value of attribute threshold.
5 6 7 |
# File 'lib/rate_limit/limit.rb', line 5 def threshold @threshold end |