Module: Qs::QsRunner::OptionalTimeout
- Defined in:
- lib/qs/qs_runner.rb
Class Method Summary collapse
Class Method Details
.new(timeout, &block) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/qs/qs_runner.rb', line 32 def self.new(timeout, &block) if !timeout.nil? SystemTimer.timeout_after(timeout, TimeoutError, &block) else block.call end end |