Class: MailRoom::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/mail_room/connection.rb

Direct Known Subclasses

IMAP::Connection, MicrosoftGraph::Connection

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#mailboxObject (readonly)

Returns the value of attribute mailbox.



5
6
7
# File 'lib/mail_room/connection.rb', line 5

def mailbox
  @mailbox
end

#new_message_handlerObject (readonly)

Returns the value of attribute new_message_handler.



5
6
7
# File 'lib/mail_room/connection.rb', line 5

def new_message_handler
  @new_message_handler
end

Instance Method Details

#on_new_message(&block) ⇒ Object



11
12
13
# File 'lib/mail_room/connection.rb', line 11

def on_new_message(&block)
  @new_message_handler = block
end

#quitObject



19
# File 'lib/mail_room/connection.rb', line 19

def quit; end

#waitObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/mail_room/connection.rb', line 15

def wait
  raise NotImplementedError
end