Class: SleepWaiter

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

Instance Method Summary collapse

Constructor Details

#initialize(sleep_time = 1) ⇒ SleepWaiter

Returns a new instance of SleepWaiter.



3
4
5
# File 'lib/sleep_waiter.rb', line 3

def initialize(sleep_time = 1)
  @sleep_time = sleep_time
end

Instance Method Details

#waitObject



7
8
9
# File 'lib/sleep_waiter.rb', line 7

def wait
  sleep @sleep_time
end