Class: Email::Poller

Inherits:
Object
  • Object
show all
Defined in:
lib/email/poller.rb

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Child class can override this

Returns:

  • (Boolean)


14
15
16
# File 'lib/email/poller.rb', line 14

def enabled?
  true
end

#poll_mailbox(process_cb) ⇒ Object

To be implemented by concrete classes. This function takes as input a function that processes the incoming email. The function passed as argument should take as an argument the MIME string of the email. An example of function to pass is ‘process_popmail` in `app/jobs/scheduled/poll_mailbox.rb`

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/email/poller.rb', line 9

def poll_mailbox(process_cb)
  raise NotImplementedError
end