Sha256: b0bb99c54f967165118088c3b2def896c7a0b4641a2606980765f8892db935eb

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

module SplitIoClient
  class ContainsAllMatcher < SetMatcher
    def self.matcher_type
      'CONTAINS_ALL'.freeze
    end

    def initialize(attribute, remote_array)
      super(attribute, remote_array)
    end

    def match?(_matching_key, _bucketing_key, _evaluator, data)
      return false if @remote_set.empty?

      @remote_set.subset? local_set(data, @attribute)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
splitclient-rb-4.3.0.canary.1 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-4.2.2 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-4.2.1 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-4.2.0 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb