Class: MatchAttributeValue
- Inherits:
-
QueryStringSearch::AbstractMatcher
- Object
- QueryStringSearch::AbstractMatcher
- MatchAttributeValue
- Defined in:
- lib/query_string_search/matchers/match_attribute_value.rb
Instance Attribute Summary
Attributes inherited from QueryStringSearch::AbstractMatcher
#attribute, #desired_value, #operator
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from QueryStringSearch::AbstractMatcher
all_reserved_words, #comparison, descendants, matchers, reserved_words
Class Method Details
.build_me?(search_option) ⇒ Boolean
8 9 10 11 12 |
# File 'lib/query_string_search/matchers/match_attribute_value.rb', line 8 def self.build_me?(search_option) search_option.desired_value && search_option.attribute && all_reserved_words.none? { |r| r.match(search_option.desired_value) } end |
Instance Method Details
#match?(data) ⇒ Boolean
2 3 4 5 6 |
# File 'lib/query_string_search/matchers/match_attribute_value.rb', line 2 def match?(data) match_with_contingency do comparison.compare(actual_value(data)) end end |