Class: Rhod::Backoffs::Random
- Defined in:
- lib/rhod/backoffs/random.rb
Instance Attribute Summary
Attributes inherited from Backoff
Instance Method Summary collapse
Methods inherited from Backoff
Constructor Details
This class inherits a constructor from Rhod::Backoffs::Backoff
Instance Method Details
#iterate(state) ⇒ Object
2 3 4 5 |
# File 'lib/rhod/backoffs/random.rb', line 2 def iterate(state) @float_range ||= (state.min.to_f..state.max.to_f) [@float_range, rand(@float_range)] end |