Method: Net::POP3#start
- Defined in:
- lib/net/pop.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.
526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/net/pop.rb', line 526 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 |