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
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
7 8 9 10 |
# File 'lib/humidifier/sleeper.rb', line 7 def initialize(attempts, &block) self.attempts = attempts hibernate_until(&block) end |
Instance Attribute Details
#attempts ⇒ Object
Returns the value of attribute attempts.
4 5 6 |
# File 'lib/humidifier/sleeper.rb', line 4 def attempts @attempts end |