Class: MatchMultipleAttributeValues
Instance Attribute Summary
#attribute, #desired_value
Class Method Summary
collapse
Instance Method Summary
collapse
all_reserved_words, #comparison, descendants, matchers
Class Method Details
.build_me?(search_option) ⇒ Boolean
22
23
24
|
# File 'lib/query_string_search/matchers/match_multiple_attribute_values.rb', line 22
def self.build_me?(search_option)
reserved_words.any? { |r| r.match(search_option.desired_value) }
end
|
.reserved_words ⇒ Object
12
13
14
15
16
|
# File 'lib/query_string_search/matchers/match_multiple_attribute_values.rb', line 12
def self.reserved_words
[
/^\w+\|\w+/
]
end
|
Instance Method Details
#desired_value=(x) ⇒ Object
18
19
20
|
# File 'lib/query_string_search/matchers/match_multiple_attribute_values.rb', line 18
def desired_value=(x)
super(x.split("|"))
end
|
#match?(data) ⇒ Boolean
2
3
4
5
6
|
# File 'lib/query_string_search/matchers/match_multiple_attribute_values.rb', line 2
def match?(data)
match_with_contingency do
comparison.compare(actual_value(data))
end
end
|
#operator ⇒ Object
8
9
10
|
# File 'lib/query_string_search/matchers/match_multiple_attribute_values.rb', line 8
def operator
:&
end
|