method

timeout

v2_4_6 - Show latest stable - Class: Object
timeout(seconds, exception=Timeout::Error)
public

Executes the passed block and raises exception if execution takes more than seconds.

If seconds is zero or nil, simply executes the block