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
Constructor Details
#initialize(attribute = nil, value = nil) ⇒ AbstractMatcher
Returns a new instance of AbstractMatcher.
17
18
19
20
|
# File 'lib/query_string_search/abstract_matcher.rb', line 17
def initialize(attribute = nil, value = nil)
self.attribute = attribute
self.value = value
end
|
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
|
#value ⇒ Object
Returns the value of attribute value.
3
4
5
|
# File 'lib/query_string_search/abstract_matcher.rb', line 3
def value
@value
end
|
Class Method Details
.all_reserved_words ⇒ Object
13
14
15
|
# File 'lib/query_string_search/abstract_matcher.rb', line 13
def self.all_reserved_words
descendants.each_with_object([]) { |d, ret| ret << d.reserved_words }.flatten
end
|
.build_me?(_, _) ⇒ Boolean
30
31
32
|
# File 'lib/query_string_search/abstract_matcher.rb', line 30
def self.build_me?(_, _)
true
end
|
.descendants ⇒ Object
9
10
11
|
# File 'lib/query_string_search/abstract_matcher.rb', line 9
def self.descendants
ObjectSpace.each_object(Class).select { |klass| klass < AbstractMatcher }
end
|
.matchers ⇒ Object
5
6
7
|
# File 'lib/query_string_search/abstract_matcher.rb', line 5
def self.matchers
descendants.push(self)
end
|
.reserved_words ⇒ Object
26
27
28
|
# File 'lib/query_string_search/abstract_matcher.rb', line 26
def self.reserved_words
[]
end
|
Instance Method Details
#match?(_) ⇒ Boolean
22
23
24
|
# File 'lib/query_string_search/abstract_matcher.rb', line 22
def match?(_)
false
end
|