diff options
author | Ola Bini <ola.bini@gmail.com> | 2014-07-31 19:35:40 -0300 |
---|---|---|
committer | Ola Bini <ola.bini@gmail.com> | 2014-07-31 19:35:40 -0300 |
commit | e54e5ee931b3991cbb5e427e7e5d27b3f6c75e6e (patch) | |
tree | 1e0da33d22874c0ea5576818fe45958611ebda29 /fake-service/lib/smail/search/negate_match.rb | |
parent | 04cf441c5ae18400c6b4865b0b37a71718dc9d46 (diff) |
Add fake-service
Diffstat (limited to 'fake-service/lib/smail/search/negate_match.rb')
-rw-r--r-- | fake-service/lib/smail/search/negate_match.rb | 22 |
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 |