Sha256: a0406e8c833836490f081a3c8fab42bc8123a6cbe10a8a6ac8b272fe75053087

Contents?: true

Size: 529 Bytes

Versions: 56

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

module SplitIoClient
  class ContainsAllMatcher < SetMatcher
    MATCHER_TYPE = 'CONTAINS_ALL'

    attr_reader :attribute

    def match?(args)
      if @remote_set.empty?
        @logger.log_if_debug('[ContainsAllMatcher] Remote Set Empty')
        return false
      end

      matches = @remote_set.subset? local_set(args[:attributes], @attribute)
      @logger.log_if_debug("[ContainsAllMatcher] Remote Set #{@remote_set} contains #{@attribute} -> #{matches}")
      matches
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
splitclient-rb-8.1.1.pre.rc2-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.1.pre.rc2 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.1.pre.rc1-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.1.pre.rc1 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.0-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.0 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.0.pre.rc1-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.1.0.pre.rc1 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.1-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.1 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.1.pre.rc1-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.1.pre.rc1 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.0-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.0 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.0.pre.rc2-java lib/splitclient-rb/engine/matchers/contains_all_matcher.rb
splitclient-rb-8.0.0.pre.rc2 lib/splitclient-rb/engine/matchers/contains_all_matcher.rb