summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-22 23:52:11 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-22 23:52:11 +0000
commit3d8cd12b4ca23fbd945c577333f0c15135f2c9d5 (patch)
tree7593d326a9885e7b1c19faae5373b314b841354d /lib
parentc3739e5b2fbebafa75070a2f06a346919d26c5df (diff)
downloadruby-3d8cd12b4ca23fbd945c577333f0c15135f2c9d5.tar.gz
ruby-3d8cd12b4ca23fbd945c577333f0c15135f2c9d5.tar.xz
ruby-3d8cd12b4ca23fbd945c577333f0c15135f2c9d5.zip
* lib/net/imap.rb (disconnected?): new method.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-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 7e8d574fb..705d54b0c 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