Class: SleepWaiter
- Inherits:
-
Object
- Object
- SleepWaiter
- Defined in:
- lib/sleep_waiter.rb
Instance Method Summary collapse
-
#initialize(sleep_time = 1) ⇒ SleepWaiter
constructor
A new instance of SleepWaiter.
- #wait ⇒ Object
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
#wait ⇒ Object
7 8 9 |
# File 'lib/sleep_waiter.rb', line 7 def wait sleep @sleep_time end |