Class: MailHandler::Receiving::Checker
- Inherits:
-
Object
- Object
- MailHandler::Receiving::Checker
- Defined in:
- lib/mailhandler/receiving/base.rb
Overview
Email receiving checker main class.
Direct Known Subclasses
Constant Summary collapse
- AVAILABLE_SEARCH_OPTIONS =
%i[ by_subject by_content since before by_recipient count archive fast_check ].freeze
Instance Attribute Summary collapse
-
#available_search_options ⇒ Object
Returns the value of attribute available_search_options.
-
#found_emails ⇒ Object
Returns the value of attribute found_emails.
-
#search_options ⇒ Object
Returns the value of attribute search_options.
Instance Method Summary collapse
- #find(_options) ⇒ Object
-
#initialize ⇒ Checker
constructor
A new instance of Checker.
- #reset_found_emails ⇒ Object
- #search_result ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize ⇒ Checker
Returns a new instance of Checker.
16 17 18 19 20 |
# File 'lib/mailhandler/receiving/base.rb', line 16 def initialize @available_search_options = AVAILABLE_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 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 end |
Instance Method Details
#find(_options) ⇒ Object
26 27 28 |
# File 'lib/mailhandler/receiving/base.rb', line 26 def find() 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 |