Class: MailHandler::Receiving::Checker

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

Overview

Email receiving checker main class.

Direct Known Subclasses

FolderChecker, IMAPChecker

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeChecker

Returns a new instance of Checker.



17
18
19
20
21
22
23
# File 'lib/mailhandler/receiving/base.rb', line 17

def initialize

  @available_search_options = AVAILABLE_SEARCH_OPTIONS
  set_base_search_options
  reset_found_emails

end

Instance Attribute Details

#available_search_optionsObject

Returns the value of attribute available_search_options.



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

def available_search_options
  @available_search_options
end

#found_emailsObject

Returns the value of attribute found_emails.



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

def found_emails
  @found_emails
end

#search_optionsObject

Returns the value of attribute search_options.



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

def search_options
  @search_options
end

Instance Method Details

#find(options) ⇒ Object



33
34
35
36
37
# File 'lib/mailhandler/receiving/base.rb', line 33

def find(options)

  raise MailHandler::InterfaceError, 'Find interface not implemented.'

end

#reset_found_emailsObject



45
46
47
48
49
# File 'lib/mailhandler/receiving/base.rb', line 45

def reset_found_emails

  @found_emails = []

end

#search_resultObject



39
40
41
42
43
# File 'lib/mailhandler/receiving/base.rb', line 39

def search_result

  !found_emails.empty?

end

#startObject



25
26
27
# File 'lib/mailhandler/receiving/base.rb', line 25

def start

end

#stopObject



29
30
31
# File 'lib/mailhandler/receiving/base.rb', line 29

def stop

end