Sha256: 1fc46657799d6cd7ffa9679e4bcb911a248caa82cf0aa7b3093303f40fd37ddb

Contents?: true

Size: 404 Bytes

Versions: 1

Compression:

Stored size: 404 Bytes

Contents

module SplitIoClient
  class PartOfSetMatcher < SetMatcher
    def self.matcher_type
      'PART_OF_SET'.freeze
    end

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

    def match?(data, bucketing_key, _evaluator, _attributes)
      @local_set = local_set(data)

      return false if @local_set.empty?

      @local_set.subset? @remote_set
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
splitclient-rb-4.3.0.canary.2 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb