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
14
15
16
17
18
|
# File 'lib/mailhandler/receiving/base.rb', line 14
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.
10
11
12
|
# File 'lib/mailhandler/receiving/base.rb', line 10
def available_search_options
@available_search_options
end
|
#found_emails ⇒ Object
Returns the value of attribute found_emails.
10
11
12
|
# File 'lib/mailhandler/receiving/base.rb', line 10
def found_emails
@found_emails
end
|
#search_options ⇒ Object
Returns the value of attribute search_options.
10
11
12
|
# File 'lib/mailhandler/receiving/base.rb', line 10
def search_options
@search_options
end
|
Instance Method Details
#find(_options) ⇒ Object
24
25
26
|
# File 'lib/mailhandler/receiving/base.rb', line 24
def find(_options)
raise MailHandler::InterfaceError, 'Find interface not implemented.'
end
|
#reset_found_emails ⇒ Object
32
33
34
|
# File 'lib/mailhandler/receiving/base.rb', line 32
def reset_found_emails
@found_emails = []
end
|
#search_result ⇒ Object
28
29
30
|
# File 'lib/mailhandler/receiving/base.rb', line 28
def search_result
!found_emails.empty?
end
|
#start ⇒ Object
20
|
# File 'lib/mailhandler/receiving/base.rb', line 20
def start; end
|
#stop ⇒ Object
22
|
# File 'lib/mailhandler/receiving/base.rb', line 22
def stop; end
|