Method: Net::POP3#start
- Defined in:
- lib/pop_ssl.rb
#start(account, password) ⇒ Object
Starts a POP3 session.
When called with block, gives a POP3 object to the block and closes the session after block call finishes.
This method raises a POPAuthenticationError if authentication fails.
518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/pop_ssl.rb', line 518 def start(account, password) # :yield: pop raise IOError, 'POP session already started' if @started if block_given? begin do_start account, password return yield(self) ensure do_finish end else do_start account, password return self end end |