Class: MatchNoAttribute
Instance Attribute Summary
#attribute, #value
Class Method Summary
collapse
Instance Method Summary
collapse
all_reserved_words, descendants, #initialize, matchers
Class Method Details
.build_me?(_, search_param) ⇒ Boolean
13
14
15
|
# File 'lib/query_string_search/matchers/match_no_attribute.rb', line 13
def self.build_me?(_, search_param)
reserved_words.any? { |r| r.match(search_param) }
end
|
.reserved_words ⇒ Object
6
7
8
9
10
11
|
# File 'lib/query_string_search/matchers/match_no_attribute.rb', line 6
def self.reserved_words
[
/^false$/,
/^none$/
]
end
|
Instance Method Details
#match?(target) ⇒ Boolean
2
3
4
|
# File 'lib/query_string_search/matchers/match_no_attribute.rb', line 2
def match?(target)
match_with_contingency { !target.public_send(attribute) }
end
|