Class: QueryStringSearch::AbstractComparison
- Inherits:
-
Object
- Object
- QueryStringSearch::AbstractComparison
show all
- Defined in:
- lib/query_string_search/abstract_comparison.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#operator ⇒ Object
Returns the value of attribute operator.
5
6
7
|
# File 'lib/query_string_search/abstract_comparison.rb', line 5
def operator
@operator
end
|
#other ⇒ Object
Returns the value of attribute other.
5
6
7
|
# File 'lib/query_string_search/abstract_comparison.rb', line 5
def other
@other
end
|
#subject ⇒ Object
Returns the value of attribute subject.
5
6
7
|
# File 'lib/query_string_search/abstract_comparison.rb', line 5
def subject
@subject
end
|
Class Method Details
.all_reserved_operators ⇒ Object
15
16
17
|
# File 'lib/query_string_search/abstract_comparison.rb', line 15
def self.all_reserved_operators
descendants.each_with_object([]) { |d, ret| ret << d.reserved_operators }.flatten
end
|
.build_me?(_) ⇒ Boolean
31
32
33
|
# File 'lib/query_string_search/abstract_comparison.rb', line 31
def self.build_me?(_)
true
end
|
.comparisons ⇒ Object
7
8
9
|
# File 'lib/query_string_search/abstract_comparison.rb', line 7
def self.comparisons
descendants.push(self)
end
|
.descendants ⇒ Object
11
12
13
|
# File 'lib/query_string_search/abstract_comparison.rb', line 11
def self.descendants
ObjectSpace.each_object(Class).select { |klass| klass < AbstractComparison }
end
|
.reserved_operators ⇒ Object
19
20
21
|
# File 'lib/query_string_search/abstract_comparison.rb', line 19
def self.reserved_operators
[]
end
|
Instance Method Details
#compare ⇒ Object
27
28
29
|
# File 'lib/query_string_search/abstract_comparison.rb', line 27
def compare
false
end
|
#normalize(unnormalized) ⇒ Object
23
24
25
|
# File 'lib/query_string_search/abstract_comparison.rb', line 23
def normalize(unnormalized)
Array(unnormalized).map(&:to_s).map(&:upcase)
end
|