summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-23 00:05:58 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-23 00:05:58 +0000
commit1dd51318a85d606ad845ac94b569c5f38e434278 (patch)
tree773c3972b4595cdc897f898be39b9871cb37e94a /lib/net
parentb74286e423abd50d8e697abd242c16bc683b6357 (diff)
* lib/net/imap.rb (disconnected?): new method. (backported from HEAD)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/imap.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 7e8d574fbe..705d54b0ce 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -289,6 +289,11 @@ module Net
@sock.close
end
+ # Returns true if disconnected from the server.
+ def disconnected?
+ return @sock.closed?
+ end
+
# Sends a CAPABILITY command, and returns an array of
# capabilities that the server supports. Each capability
# is a string. See [IMAP] for a list of possible