Method: Mail::IMAP#connection
- Defined in:
- lib/mail/network/retriever_methods/imap.rb
#connection(&block) ⇒ Object
Returns the connection object of the retrievable (IMAP or POP3)
133 134 135 136 137 138 139 |
# File 'lib/mail/network/retriever_methods/imap.rb', line 133 def connection(&block) raise ArgumentError.new('Mail::Retrievable#connection takes a block') unless block_given? start do |imap| yield imap end end |