Class: ImapMogura::ToMatcher
- Inherits:
-
SpecialFieldMatcher
- Object
- RuleElement
- FieldMatcher
- SpecialFieldMatcher
- ImapMogura::ToMatcher
- Defined in:
- lib/imap_mogura/rules_parser/rule_elements.rb
Instance Attribute Summary
Attributes inherited from FieldMatcher
Instance Method Summary collapse
Methods inherited from FieldMatcher
Constructor Details
This class inherits a constructor from ImapMogura::FieldMatcher
Instance Method Details
#match?(mail) ⇒ Boolean
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/imap_mogura/rules_parser/rule_elements.rb', line 88 def match?(mail) ("To #{mail.to.inspect} matches the regexp #{@regexp}") debug_out_if_it_matches_rule( case mail.to when Enumerable mail.to.any? { |address| address&.match?(@regexp) } else mail.to&.match?(@regexp) end ) end |