Class: SplitIoClient::ContainsAllMatcher

Inherits:
SetMatcher
  • Object
show all
Defined in:
lib/engine/matchers/contains_all_matcher.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute, remote_array) ⇒ ContainsAllMatcher

Returns a new instance of ContainsAllMatcher.



7
8
9
# File 'lib/engine/matchers/contains_all_matcher.rb', line 7

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

Class Method Details

.matcher_type ⇒ Object



3
4
5
# File 'lib/engine/matchers/contains_all_matcher.rb', line 3

def self.matcher_type
  'CONTAINS_ALL'.freeze
end

Instance Method Details

#match?(_key, data) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
# File 'lib/engine/matchers/contains_all_matcher.rb', line 11

def match?(_key, data)
  return false if @remote_set.empty?

  @remote_set.subset? local_set(data, @attribute)
end