Module: MemDB::Field
- Included in:
- Downcase, Enum, MayMissing, Negative, Pattern, Regexp
- Defined in:
- lib/mem_db/field.rb,
lib/mem_db/field/enum.rb,
lib/mem_db/field/regexp.rb,
lib/mem_db/field/pattern.rb,
lib/mem_db/field/downcase.rb,
lib/mem_db/field/matching.rb,
lib/mem_db/field/negative.rb,
lib/mem_db/field/may_missing.rb
Defined Under Namespace
Modules: Matching
Classes: Downcase, Enum, MayMissing, Negative, Pattern, Regexp
Instance Method Summary
collapse
Instance Method Details
#field ⇒ Object
17
18
19
|
# File 'lib/mem_db/field.rb', line 17
def field
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
|
#field_value(obj) ⇒ Object
34
35
36
|
# File 'lib/mem_db/field.rb', line 34
def field_value(obj)
obj[field]
end
|
#new_matching(_value) ⇒ Object
30
31
32
|
# File 'lib/mem_db/field.rb', line 30
def new_matching(_value)
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
end
|
#prepare_query(query) ⇒ Object
38
39
40
|
# File 'lib/mem_db/field.rb', line 38
def prepare_query(query)
query[query_field]
end
|
#query(query_field) ⇒ Object
21
22
23
24
|
# File 'lib/mem_db/field.rb', line 21
def query(query_field)
@query_field = query_field
self
end
|
#query_field ⇒ Object
26
27
28
|
# File 'lib/mem_db/field.rb', line 26
def query_field
@query_field || field
end
|