Class: SplitIoClient::PartOfSetMatcher
- Inherits:
-
SetMatcher
- Object
- SetMatcher
- SplitIoClient::PartOfSetMatcher
- Defined in:
- lib/engine/matchers/part_of_set_matcher.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attribute, remote_array) ⇒ PartOfSetMatcher
constructor
A new instance of PartOfSetMatcher.
- #match?(_key, data) ⇒ Boolean
Constructor Details
#initialize(attribute, remote_array) ⇒ PartOfSetMatcher
Returns a new instance of PartOfSetMatcher.
7 8 9 |
# File 'lib/engine/matchers/part_of_set_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/part_of_set_matcher.rb', line 3 def self.matcher_type 'PART_OF_SET'.freeze end |
Instance Method Details
#match?(_key, data) ⇒ Boolean
11 12 13 14 15 16 17 |
# File 'lib/engine/matchers/part_of_set_matcher.rb', line 11 def match?(_key, data) @local_set = local_set(data, @attribute) return false if @local_set.empty? @local_set.subset? @remote_set end |