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.
18 19 20 21 |
# File 'lib/philiprehberger/rate_limiter.rb', line 18 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.
16 17 18 |
# File 'lib/philiprehberger/rate_limiter.rb', line 16 def key @key end |