Module: WaitFor

Defined in:
lib/waitfor/version.rb,
lib/waitfor.rb

Overview

:nodoc:

Defined Under Namespace

Modules: VERSION

Class Method Summary collapse

Class Method Details

.upto(length_of_time) ⇒ Object



9
10
11
12
13
14
# File 'lib/waitfor.rb', line 9

def upto( length_of_time )
  timer = Timer.new length_of_time
  until yield or timer.out_of_time?
    sleep 1
  end
end