Flowdock
method

expect

Importance_1
v1_9_3_392 - Show latest stable - 0 notes - Class: IO
expect(pat,timeout=9999999) public

Reads from the IO until pattern pat matches or the timeout is over. It returns an array with the read buffer, followed by the matches. If a block is given, the result is yielded to the block and returns nil.

The optional timeout parameter defines, in seconds, the total time to wait for the pattern. If the timeout expires or eof is found, nil is returned or yielded. However, the buffer in a timeout session is kept for the next expect call. The default timeout is 9999999 seconds.

Show source
Register or log in to add new notes.