Exception: Philiprehberger::RateLimiter::RateLimitExceeded
- Defined in:
- lib/philiprehberger/rate_limiter.rb
Overview
Raised by allow! when the rate limit is exceeded
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
The key that was rate-limited.
Instance Method Summary collapse
-
#initialize(key) ⇒ RateLimitExceeded
constructor
A new instance of RateLimitExceeded.
Constructor Details
#initialize(key) ⇒ RateLimitExceeded
Returns a new instance of RateLimitExceeded.
19 20 21 22 |
# File 'lib/philiprehberger/rate_limiter.rb', line 19 def initialize(key) @key = key super("Rate limit exceeded for #{key}") end |
Instance Attribute Details
#key ⇒ String (readonly)
Returns the key that was rate-limited.
17 18 19 |
# File 'lib/philiprehberger/rate_limiter.rb', line 17 def key @key end |