summaryrefslogtreecommitdiff
path: root/lib/telnet.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-27 10:04:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-27 10:04:11 +0000
commit9e48333190cb95ecd4d8a49eed103518457e8ace (patch)
tree0a28d6aa4707629c5d106e979c316c5b65b72e60 /lib/telnet.rb
parent043c693d6a7521604ced80a0619d38b4f187f1c9 (diff)
tcltklib/gtk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/telnet.rb')
-rw-r--r--lib/telnet.rb52
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/telnet.rb b/lib/telnet.rb
index e93c2aaa8e6..44fda9e41ae 100644
--- a/lib/telnet.rb
+++ b/lib/telnet.rb
@@ -4,54 +4,54 @@
# Wakou Aoyama <wakou@fsinet.or.jp>
#
# == make new Telnet object
-# host = Telnet.new({"Binmode" => TRUE, default: TRUE
-# "Host" => "localhost", default: "localhost"
-# "Output_log"] => "output_log", default: not output
-# "Port" => 23, default: 23
-# "Prompt" => /[$%#>] $/, default: /[$%#>] $/
-# "Telnetmode"] => TRUE, default: TRUE
-# "Timeout"] => 10} default: 10
+# host = Telnet.new("Binmode" => TRUE, default: TRUE
+# "Host" => "localhost", default: "localhost"
+# "Output_log" => "output_log", default: not output
+# "Port" => 23, default: 23
+# "Prompt" => /[$%#>] $/, default: /[$%#>] $/
+# "Telnetmode" => TRUE, default: TRUE
+# "Timeout" => 10) default: 10
#
# if set "Telnetmode" option FALSE. not TELNET command interpretation.
#
# == wait for match
# print host.waitfor(/match/)
-# print host.waitfor({"Match" => /match/,
-# "String" => "string",
-# "Timeout" => secs})
+# print host.waitfor("Match" => /match/,
+# "String" => "string",
+# "Timeout" => secs)
# if set "String" option. Match = Regexp.new(quote(string))
#
# realtime output. of cource, set sync=TRUE or flush is necessary.
# host.waitfor(/match/){|c| print c }
-# host.waitfor({"Match" => /match/,
-# "String" => "string",
-# "Timeout" => secs}){|c| print c}
+# host.waitfor("Match" => /match/,
+# "String" => "string",
+# "Timeout" => secs){|c| print c}
#
# == send string and wait prompt
# print host.cmd("string")
-# print host.cmd({"String" => "string",
-# "Prompt" => /[$%#>] $//,
-# "Timeout" => 10})
+# print host.cmd("String" => "string",
+# "Prompt" => /[$%#>] $//,
+# "Timeout" => 10)
#
# realtime output. of cource, set sync=TRUE or flush is necessary.
# host.cmd("string"){|c| print c }
-# host.cmd({"String" => "string",
-# "Prompt" => /[$%#>] $//,
-# "Timeout" => 10}){|c| print c }
+# host.cmd("String" => "string",
+# "Prompt" => /[$%#>] $//,
+# "Timeout" => 10){|c| print c }
#
# == login
# host.login("username", "password")
-# host.login({"Name" => "username",
-# "Password" => "password",
-# "Prompt" => /[$%#>] $/,
-# "Timeout" => 10})
+# host.login("Name" => "username",
+# "Password" => "password",
+# "Prompt" => /[$%#>] $/,
+# "Timeout" => 10)
#
# and Telnet object has socket class methods
#
# == sample
-# localhost = Telnet.new({"Host" => "localhost",
-# "Timeout" => 10,
-# "Prompt" => /[$%#>] $/})
+# localhost = Telnet.new("Host" => "localhost",
+# "Timeout" => 10,
+# "Prompt" => /[$%#>] $/)
# localhost.login("username", "password")
# print localhost.cmd("command")
# localhost.close