Class: QueryStringSearch::AbstractMatcher
- Inherits:
-
Object
- Object
- QueryStringSearch::AbstractMatcher
show all
- Defined in:
- lib/query_string_search/abstract_matcher.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
3
4
5
|
# File 'lib/query_string_search/abstract_matcher.rb', line 3
def attribute
@attribute
end
|
#desired_value ⇒ Object
Returns the value of attribute desired_value.
3
4
5
|
# File 'lib/query_string_search/abstract_matcher.rb', line 3
def desired_value
@desired_value
end
|
#operator ⇒ Object
Returns the value of attribute operator.
4
5
6
|
# File 'lib/query_string_search/abstract_matcher.rb', line 4
def operator
@operator
end
|
Class Method Details
.all_reserved_words ⇒ Object
14
15
16
|
# File 'lib/query_string_search/abstract_matcher.rb', line 14
def self.all_reserved_words
descendants.each_with_object([]) { |d, ret| ret << d.reserved_words }.flatten
end
|
.build_me?(_) ⇒ Boolean
26
27
28
|
# File 'lib/query_string_search/abstract_matcher.rb', line 26
def self.build_me?(_)
true
end
|
.descendants ⇒ Object
10
11
12
|
# File 'lib/query_string_search/abstract_matcher.rb', line 10
def self.descendants
ObjectSpace.each_object(Class).select { |klass| klass < AbstractMatcher }
end
|
.matchers ⇒ Object
6
7
8
|
# File 'lib/query_string_search/abstract_matcher.rb', line 6
def self.matchers
descendants.push(self)
end
|
.reserved_words ⇒ Object
22
23
24
|
# File 'lib/query_string_search/abstract_matcher.rb', line 22
def self.reserved_words
[]
end
|
Instance Method Details
#comparison ⇒ Object
34
35
36
|
# File 'lib/query_string_search/abstract_matcher.rb', line 34
def comparison
@comparison ||= QueryStringSearch::Comparator::ComparisonFactory.build(self)
end
|
#match?(_) ⇒ Boolean
18
19
20
|
# File 'lib/query_string_search/abstract_matcher.rb', line 18
def match?(_)
false
end
|