Class: MailHandler::Receiving::IMAPChecker

Inherits:
Checker
  • Object
show all
Defined in:
lib/mailhandler/receiving/imap.rb

Instance Attribute Summary collapse

Attributes inherited from Checker

#available_search_options, #found_emails, #search_options

Instance Method Summary collapse

Methods inherited from Checker

#reset_found_emails, #search_result

Constructor Details

#initializeIMAPChecker

Returns a new instance of IMAPChecker.



20
21
22
23
24
25
# File 'lib/mailhandler/receiving/imap.rb', line 20

def initialize

  super
  @available_search_options = AVAILABLE_SEARCH_OPTIONS

end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



13
14
15
# File 'lib/mailhandler/receiving/imap.rb', line 13

def address
  @address
end

#authenticationObject

Returns the value of attribute authentication.



13
14
15
# File 'lib/mailhandler/receiving/imap.rb', line 13

def authentication
  @authentication
end

#passwordObject

Returns the value of attribute password.



13
14
15
# File 'lib/mailhandler/receiving/imap.rb', line 13

def password
  @password
end

#portObject

Returns the value of attribute port.



13
14
15
# File 'lib/mailhandler/receiving/imap.rb', line 13

def port
  @port
end

#use_sslObject

Returns the value of attribute use_ssl.



13
14
15
# File 'lib/mailhandler/receiving/imap.rb', line 13

def use_ssl
  @use_ssl
end

#usernameObject

Returns the value of attribute username.



13
14
15
# File 'lib/mailhandler/receiving/imap.rb', line 13

def username
  @username
end

Instance Method Details

#find(options) ⇒ Object



27
28
29
30
31
32
33
34
# File 'lib/mailhandler/receiving/imap.rb', line 27

def find(options)

  verify_and_set_search_options(options)
  @found_emails = find_emails(search_options)

  search_result

end

#startObject



36
37
38
39
40
41
# File 'lib/mailhandler/receiving/imap.rb', line 36

def start

  init_retriever
  connect

end

#stopObject



43
44
45
46
47
# File 'lib/mailhandler/receiving/imap.rb', line 43

def stop

  disconnect

end