Class: MailHandler::Receiving::Checker
- Inherits:
-
Object
- Object
- MailHandler::Receiving::Checker
show all
- Defined in:
- lib/mailhandler/receiving/base.rb
Overview
Email receiving checker main class.
Constant Summary
collapse
- AVAILABLE_SEARCH_OPTIONS =
i[
by_subject
by_content
since
before
by_recipient
count
archive
fast_check
].freeze
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
16
17
18
19
20
|
# File 'lib/mailhandler/receiving/base.rb', line 16
def initialize
@available_search_options = AVAILABLE_SEARCH_OPTIONS
set_base_search_options
reset_found_emails
end
|
Instance Attribute Details
#available_search_options ⇒ Object
Returns the value of attribute available_search_options.
12
13
14
|
# File 'lib/mailhandler/receiving/base.rb', line 12
def available_search_options
@available_search_options
end
|
#found_emails ⇒ Object
Returns the value of attribute found_emails.
12
13
14
|
# File 'lib/mailhandler/receiving/base.rb', line 12
def found_emails
@found_emails
end
|
#search_options ⇒ Object
Returns the value of attribute search_options.
12
13
14
|
# File 'lib/mailhandler/receiving/base.rb', line 12
def search_options
@search_options
end
|
Instance Method Details
#find(_options) ⇒ Object
26
27
28
|
# File 'lib/mailhandler/receiving/base.rb', line 26
def find(_options)
raise MailHandler::InterfaceError, 'Find interface not implemented.'
end
|
#reset_found_emails ⇒ Object
34
35
36
|
# File 'lib/mailhandler/receiving/base.rb', line 34
def reset_found_emails
@found_emails = []
end
|
#search_result ⇒ Object
30
31
32
|
# File 'lib/mailhandler/receiving/base.rb', line 30
def search_result
!found_emails.empty?
end
|
#start ⇒ Object
22
|
# File 'lib/mailhandler/receiving/base.rb', line 22
def start; end
|
#stop ⇒ Object
24
|
# File 'lib/mailhandler/receiving/base.rb', line 24
def stop; end
|