Exception: RateLimit::Errors::LimitExceededError
- Inherits:
-
StandardError
- Object
- StandardError
- RateLimit::Errors::LimitExceededError
- Defined in:
- lib/rate_limit/errors/limit_exceeded_error.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #custom_message ⇒ Object
-
#initialize(result) ⇒ LimitExceededError
constructor
A new instance of LimitExceededError.
Constructor Details
#initialize(result) ⇒ LimitExceededError
Returns a new instance of LimitExceededError.
10 11 12 13 14 |
# File 'lib/rate_limit/errors/limit_exceeded_error.rb', line 10 def initialize(result) @result = result super() end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/rate_limit/errors/limit_exceeded_error.rb', line 6 def result @result end |
Instance Method Details
#custom_message ⇒ Object
16 17 18 |
# File 'lib/rate_limit/errors/limit_exceeded_error.rb', line 16 def "#{result.topic}: has exceeded #{result.threshold} in #{result.interval} seconds" end |