Exception: Prop::RateLimitExceededError
- Defined in:
- lib/prop.rb
Instance Attribute Summary collapse
-
#handle ⇒ Object
Returns the value of attribute handle.
-
#retry_after ⇒ Object
Returns the value of attribute retry_after.
Class Method Summary collapse
Instance Attribute Details
#handle ⇒ Object
Returns the value of attribute handle.
11 12 13 |
# File 'lib/prop.rb', line 11 def handle @handle end |
#retry_after ⇒ Object
Returns the value of attribute retry_after.
11 12 13 |
# File 'lib/prop.rb', line 11 def retry_after @retry_after end |
Class Method Details
.create(handle, key, threshold) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/prop.rb', line 13 def self.create(handle, key, threshold) error = new("#{handle} threshold of #{threshold} exceeded for key '#{key}'") error.handle = handle error.retry_after = threshold - Time.now.to_i % threshold if threshold > 0 raise error end |