Sha256: f45ae2ab60dd3dfa90a03b62da840b3820250ded20222020032521e96bb3a3d1
Contents?: true
Size: 658 Bytes
Versions: 28
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true module SplitIoClient class PartOfSetMatcher < SetMatcher MATCHER_TYPE = 'PART_OF_SET' attr_reader :attribute def initialize(attribute, remote_array) super(attribute, remote_array) end def match?(args) @local_set = local_set(args[:attributes], @attribute) if @local_set.empty? SplitLogger.log_if_debug('[PartOfSetMatcher] Local Set is empty.') return false end matches = @local_set.subset? @remote_set SplitLogger.log_if_debug("[PartOfSetMatcher] Local Set #{@local_set} is a subset of #{@remote_set} -> #{matches}") matches end end end
Version data entries
28 entries across 28 versions & 1 rubygems