Class: Waiting::Waiter
- Inherits:
-
Object
- Object
- Waiting::Waiter
- Defined in:
- lib/waiting/waiter.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
Returns the value of attribute attempts.
-
#exp_base ⇒ Object
Returns the value of attribute exp_base.
-
#interval ⇒ Object
Returns the value of attribute interval.
-
#max_attempts ⇒ Object
Returns the value of attribute max_attempts.
Instance Method Summary collapse
-
#done ⇒ Object
Mark the waiter as done.
-
#done? ⇒ Boolean
Is the waiter done?.
-
#initialize ⇒ Waiter
constructor
Waiter is in waiting state to start with.
Constructor Details
#initialize ⇒ Waiter
Waiter is in waiting state to start with
9 10 11 |
# File 'lib/waiting/waiter.rb', line 9 def initialize @done = false end |
Instance Attribute Details
#attempts ⇒ Object
Returns the value of attribute attempts.
3 4 5 |
# File 'lib/waiting/waiter.rb', line 3 def attempts @attempts end |
#exp_base ⇒ Object
Returns the value of attribute exp_base.
4 5 6 |
# File 'lib/waiting/waiter.rb', line 4 def exp_base @exp_base end |
#interval ⇒ Object
Returns the value of attribute interval.
5 6 7 |
# File 'lib/waiting/waiter.rb', line 5 def interval @interval end |
#max_attempts ⇒ Object
Returns the value of attribute max_attempts.
6 7 8 |
# File 'lib/waiting/waiter.rb', line 6 def max_attempts @max_attempts end |
Instance Method Details
#done ⇒ Object
Mark the waiter as done
14 15 16 |
# File 'lib/waiting/waiter.rb', line 14 def done @done = true end |
#done? ⇒ Boolean
Is the waiter done?
20 21 22 |
# File 'lib/waiting/waiter.rb', line 20 def done? @done end |