Class: Humidifier::Sleeper

Inherits:
Object
  • Object
show all
Defined in:
lib/humidifier/sleeper.rb

Overview

Manages waiting for stack events for v1 of the SDK

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attemptsObject

Returns the value of attribute attempts.



4
5
6
# File 'lib/humidifier/sleeper.rb', line 4

def attempts
  @attempts
end