Sha256: 0d066a65be196b5d37372bc2f1e667e4fb639506f944f07ef4d1320d08d0e12a

Contents?: true

Size: 438 Bytes

Versions: 62

Compression:

Stored size: 438 Bytes

Contents

module SplitIoClient
  class PartOfSetMatcher < SetMatcher
    MATCHER_TYPE = 'PART_OF_SET'.freeze

    attr_reader :attribute

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

    def match?(args)
      @local_set = local_set(args[:attributes], @attribute)

      return false if @local_set.empty?

      @local_set.subset? @remote_set
    end

    def string_type?
      false
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
splitclient-rb-6.0.1-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.1 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.1.pre.rc2-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.1.pre.rc2 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.1.pre.rc1-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.1.pre.rc1 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.0-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-6.0.0 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc4-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc4 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc3-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc3 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc2-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc2 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.4.pre.rc1-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.4.pre.rc1 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc1-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.3.pre.rc1 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.2-java lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb
splitclient-rb-5.1.2 lib/splitclient-rb/engine/matchers/part_of_set_matcher.rb