@@ -807,9 +807,11 @@ class IMAP < Protocol
807807 def self . config ; Config . global end
808808
809809 # Returns the global debug mode.
810+ # Delegates to {Net::IMAP.config.debug}[rdoc-ref:Config#debug].
810811 def self . debug ; config . debug end
811812
812813 # Sets the global debug mode.
814+ # Delegates to {Net::IMAP.config.debug=}[rdoc-ref:Config#debug=].
813815 def self . debug = ( val )
814816 config . debug = val
815817 end
@@ -830,7 +832,7 @@ class << self
830832 alias default_ssl_port default_tls_port
831833 end
832834
833- # Returns the initial greeting the server, an UntaggedResponse.
835+ # Returns the initial greeting sent by the server, an UntaggedResponse.
834836 attr_reader :greeting
835837
836838 # The client configuration. See Net::IMAP::Config.
@@ -839,13 +841,20 @@ class << self
839841 # Net::IMAP.config.
840842 attr_reader :config
841843
842- # Seconds to wait until a connection is opened.
843- # If the IMAP object cannot open a connection within this time,
844- # it raises a Net::OpenTimeout exception. The default value is 30 seconds .
845- def open_timeout ; config . open_timeout end
844+ ##
845+ # :attr_reader: open_timeout
846+ # Seconds to wait until a connection is opened. Also used by #starttls .
847+ # Delegates to { config.open_timeout}[rdoc-ref:Config#open_timeout].
846848
849+ ##
850+ # :attr_reader: idle_response_timeout
847851 # Seconds to wait until an IDLE response is received.
848- def idle_response_timeout ; config . idle_response_timeout end
852+ # Delegates to {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout].
853+
854+ # :stopdoc:
855+ def open_timeout ; config . open_timeout end
856+ def idle_response_timeout ; config . idle_response_timeout end
857+ # :startdoc:
849858
850859 # The hostname this client connected to
851860 attr_reader :host
@@ -1332,6 +1341,10 @@ def logout!
13321341 # both successful. Any error indicates that the connection has not been
13331342 # secured.
13341343 #
1344+ # After the server agrees to start a TLS connection, this method waits up to
1345+ # {config.open_timeout}[rdoc-ref:Config#open_timeout] before raising
1346+ # +Net::OpenTimeout+.
1347+ #
13351348 # *Note:*
13361349 # >>>
13371350 # Any #response_handlers added before STARTTLS should be aware that the
0 commit comments