Class: MailHandler::Receiving::IMAPChecker

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

Constant Summary collapse

AVAILABLE_SEARCH_OPTIONS =
[

    :by_subject,
    :count,
    :archive,
    :by_recipient

]

Constants inherited from Checker

Checker::DEFAULT_SEARCH_OPTIONS

Instance Attribute Summary collapse

Attributes inherited from Checker

#found_emails, #search_options

Instance Method Summary collapse

Methods inherited from Checker

#search_result

Constructor Details

#initializeIMAPChecker

Returns a new instance of IMAPChecker.



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

def initialize

  super

end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



11
12
13
# File 'lib/mailhandler/receiving/imap.rb', line 11

def address
  @address
end

#authenticationObject

Returns the value of attribute authentication.



11
12
13
# File 'lib/mailhandler/receiving/imap.rb', line 11

def authentication
  @authentication
end

#passwordObject

Returns the value of attribute password.



11
12
13
# File 'lib/mailhandler/receiving/imap.rb', line 11

def password
  @password
end

#portObject

Returns the value of attribute port.



11
12
13
# File 'lib/mailhandler/receiving/imap.rb', line 11

def port
  @port
end

#use_sslObject

Returns the value of attribute use_ssl.



11
12
13
# File 'lib/mailhandler/receiving/imap.rb', line 11

def use_ssl
  @use_ssl
end

#usernameObject

Returns the value of attribute username.



11
12
13
# File 'lib/mailhandler/receiving/imap.rb', line 11

def username
  @username
end

Instance Method Details

#find(options) ⇒ Object



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

def find(options)

  verify_and_set_search_options(options)
  validate_options(options)
  init_retriever
  @found_emails = find_emails(search_options)

  search_result

end