Method: Vmail::ImapClient#with_open
- Defined in:
- lib/vmail/imap_client.rb
#with_open {|_self| ... } ⇒ Object
expects a block, closes on finish
62 63 64 65 66 67 |
# File 'lib/vmail/imap_client.rb', line 62 def with_open @imap = Net::IMAP.new(@imap_server, @imap_port, true, nil, false) log @imap.login(@username, @password) yield self close end |