Sha256: 15bb079125950c3c2bc3429f40a97da28e05ea6ba79a354a5a5736329a396a29
Contents?: true
Size: 413 Bytes
Versions: 2
Compression:
Stored size: 413 Bytes
Contents
module SplitIoClient class ContainsMatcher def self.matcher_type 'CONTAINS_WITH'.freeze end def initialize(attribute, substr_list) @attribute = attribute @substr_list = substr_list end def match?(value, _matching_key, _bucketing_key, _evaluator) return false if @substr_list.empty? @substr_list.any? { |substr| value.to_s.include? substr } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
splitclient-rb-4.3.0.canary.2 | lib/splitclient-rb/engine/matchers/contains_matcher.rb |
splitclient-rb-4.3.0.canary.1 | lib/splitclient-rb/engine/matchers/contains_matcher.rb |