Class: WaitFor::Timer

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Timer

A new instance of Timer.



7
8
9
10
# File 'lib/waitfor/timer.rb', line 7

def initialize( options )
  @config = WaitFor::Settings::Configuration.new( options )
  @start_time = Time.now
end

Instance Method Details

#out_of_time?Boolean

Returns whether the elapsed time has surpassed the allotted time

Raises:



16
17
18
19
# File 'lib/waitfor/timer.rb', line 16

def out_of_time?
  raise_exception if timed_out?
  false
end