Class: MailRoom::Connection
- Inherits:
-
Object
- Object
- MailRoom::Connection
- Defined in:
- lib/mail_room/connection.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#mailbox ⇒ Object
readonly
Returns the value of attribute mailbox.
-
#new_message_handler ⇒ Object
readonly
Returns the value of attribute new_message_handler.
Instance Method Summary collapse
-
#initialize(mailbox) ⇒ Connection
constructor
A new instance of Connection.
- #on_new_message(&block) ⇒ Object
- #quit ⇒ Object
- #wait ⇒ Object
Constructor Details
#initialize(mailbox) ⇒ Connection
Returns a new instance of Connection.
7 8 9 |
# File 'lib/mail_room/connection.rb', line 7 def initialize(mailbox) @mailbox = mailbox end |
Instance Attribute Details
#mailbox ⇒ Object (readonly)
Returns the value of attribute mailbox.
5 6 7 |
# File 'lib/mail_room/connection.rb', line 5 def mailbox @mailbox end |
#new_message_handler ⇒ Object (readonly)
Returns the value of attribute new_message_handler.
5 6 7 |
# File 'lib/mail_room/connection.rb', line 5 def @new_message_handler end |
Instance Method Details
#on_new_message(&block) ⇒ Object
11 12 13 |
# File 'lib/mail_room/connection.rb', line 11 def (&block) @new_message_handler = block end |
#quit ⇒ Object
19 |
# File 'lib/mail_room/connection.rb', line 19 def quit; end |
#wait ⇒ Object
15 16 17 |
# File 'lib/mail_room/connection.rb', line 15 def wait raise NotImplementedError end |