summaryrefslogtreecommitdiff
path: root/fake-service/lib/pixelated_service/search/negate_match.rb
blob: 77d880e85c5d857640e72d8aacbcb7da5471d662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module PixelatedService
  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