Ruby Net::Telnet Functions

EditRocket provides the following information on Net::Telnet functions in the Ruby source code builder.

binmode=(mode) - Turn newline conversion on (false) or off (true).

binmode(mode = nil) - Turn newline conversion on (mode == false) or off (mode == true), or return the current value (mode is not specified).

cmd(options) - Send a command to the host.

login(options, password = nil) - Login to the host with a given username and password.

new(options) - Creates a new Net::Telnet object.

preprocess(string) - Preprocess received data from the host.

print(string) - Sends a string to the host.

puts(string) - Sends a string to the host.

telnetmode=(mode) - Turn telnet command interpretation on (true) or off (false). It should be on for true telnet sessions, off if using Net::Telnet to connect to a non-telnet service such as SMTP.

telnetmode(mode = nil) - Set telnet command interpretation on (mode == true) or off (mode == false), or return the current value (mode not provided). It should be on for true telnet sessions, off if using Net::Telnet to connect to a non-telnet service such as SMTP.

waitfor(options) - Read data from the host until a certain sequence is matched.

write(string) - Write string to the host.