Class: WaitFor::Timer
- Inherits:
-
Object
- Object
- WaitFor::Timer
- Defined in:
- lib/waitfor/timer.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Timer
constructor
A new instance of Timer.
-
#out_of_time? ⇒ Boolean
Returns whether the elapsed time has surpassed the allotted time.
Constructor Details
#initialize(options) ⇒ Timer
A new instance of Timer.
7 8 9 10 |
# File 'lib/waitfor/timer.rb', line 7 def initialize( ) @config = WaitFor::Settings::Configuration.new( ) @start_time = Time.now end |
Instance Method Details
#out_of_time? ⇒ Boolean
Returns whether the elapsed time has surpassed the allotted time
16 17 18 19 |
# File 'lib/waitfor/timer.rb', line 16 def out_of_time? raise_exception if timed_out? false end |