Class: Humidifier::Sleeper
- Inherits:
-
Object
- Object
- Humidifier::Sleeper
- Defined in:
- lib/humidifier/sleeper.rb
Overview
Manages waiting for stack events for v1 of the SDK
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
Instance Method Summary collapse
-
#initialize(attempts, &block) ⇒ Sleeper
constructor
Store attempts and wait for the block to return true.
Constructor Details
#initialize(attempts, &block) ⇒ Sleeper
Store attempts and wait for the block to return true
9 10 11 12 |
# File 'lib/humidifier/sleeper.rb', line 9 def initialize(attempts, &block) @attempts = attempts hibernate_until(&block) end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
6 7 8 |
# File 'lib/humidifier/sleeper.rb', line 6 def attempts @attempts end |