Class: Nervion::WaitCalculator
- Inherits:
-
Object
- Object
- Nervion::WaitCalculator
- Defined in:
- lib/nervion/reconnection_scheduler.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(max_wait, &calculator) ⇒ WaitCalculator
constructor
A new instance of WaitCalculator.
- #wait_after(error_count) ⇒ Object
Constructor Details
#initialize(max_wait, &calculator) ⇒ WaitCalculator
Returns a new instance of WaitCalculator.
56 57 58 59 |
# File 'lib/nervion/reconnection_scheduler.rb', line 56 def initialize(max_wait, &calculator) @max_wait = max_wait @calculator = calculator end |
Instance Method Details
#wait_after(error_count) ⇒ Object
61 62 63 |
# File 'lib/nervion/reconnection_scheduler.rb', line 61 def wait_after(error_count) cap_wait @max_wait, calculate_wait_after(error_count) end |