summaryrefslogtreecommitdiff
path: root/fake-service/lib/smail/search/negate_match.rb
diff options
context:
space:
mode:
Diffstat (limited to 'fake-service/lib/smail/search/negate_match.rb')
-rw-r--r--fake-service/lib/smail/search/negate_match.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/fake-service/lib/smail/search/negate_match.rb b/fake-service/lib/smail/search/negate_match.rb
new file mode 100644
index 00000000..f8bb59d4
--- /dev/null
+++ b/fake-service/lib/smail/search/negate_match.rb
@@ -0,0 +1,22 @@
+module Smail
+ class Search
+ class NegateMatch
+ attr_reader :data
+ def initialize(data)
+ @data = data
+ end
+
+ def to_s
+ "Negate(#@data)"
+ end
+
+ def match?(mail)
+ !self.data.match?(mail)
+ end
+
+ def match_string?(str)
+ !self.data.match_string?(str)
+ end
+ end
+ end
+end