class TL1::Session::WaitforWrapper
Wraps objects that support `#waitfor` but not `#expect`, such as Net::Telnet and Net::SSH::Telnet. It is used transparently by `TL1::Session#initialize` for those classes, so it shouldn't be necessary to use it directly. If you are defining a new class that responds to `#waitfor`, you can define your own `#expect` method instead of using this.
Public Class Methods
new(io)
click to toggle source
# File lib/tl1/session.rb, line 73 def initialize(io) @io = io end
Public Instance Methods
expect(pattern, timeout)
click to toggle source
# File lib/tl1/session.rb, line 77 def expect(pattern, timeout) @io.waitfor('Match' => pattern, 'Timeout' => timeout) end
write(*args)
click to toggle source
# File lib/tl1/session.rb, line 81 def write(*args) @io.write(*args) end