Class: ImapMogura::CcMatcher
- Inherits:
-
SpecialFieldMatcher
- Object
- RuleElement
- FieldMatcher
- SpecialFieldMatcher
- ImapMogura::CcMatcher
- 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
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/imap_mogura/rules_parser/rule_elements.rb', line 102 def match?(mail) ("Cc #{mail.cc.inspect} matches the regexp #{@regexp}") debug_out_if_it_matches_rule( case mail.cc when Enumerable mail.cc.any? { |address| address&.match?(@regexp) } else mail.cc&.match?(@regexp) end ) end |