Sha256: a60eaa9ec387a12cec88cd323f33e8caa6f52eb2592bf3f9f928c4e4ece0f431

Contents?: true

Size: 545 Bytes

Versions: 238

Compression:

Stored size: 545 Bytes

Contents

# frozen_string_literal: true

module SplitIoClient
  class ContainsAnyMatcher < SetMatcher
    MATCHER_TYPE = 'CONTAINS_ANY'

    attr_reader :attribute

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

    def match?(args)
      matches = local_set(args[:attributes], @attribute).intersect? @remote_set
      @logger.log_if_debug("[ContainsAnyMatcher] Remote Set #{@remote_set} contains any \
        #{@attribute} or #{args[:attributes]}-> #{matches}")
      matches
    end
  end
end

Version data entries

238 entries across 238 versions & 1 rubygems

Version Path
splitclient-rb-7.3.3.pre.rc18-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc18 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc17-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc17 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc16-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc16 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc15-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc15 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc14-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc14 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc13-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc13 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc12-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc12 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc11-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc11 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc10-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc10 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc9-java lib/splitclient-rb/engine/matchers/contains_any_matcher.rb
splitclient-rb-7.3.3.pre.rc9 lib/splitclient-rb/engine/matchers/contains_any_matcher.rb