Class: Mongory::CMatcher
- Inherits:
-
Object
- Object
- Mongory::CMatcher
- Defined in:
- lib/mongory/c_matcher.rb
Overview
This class is the C extension of Mongory::QueryMatcher. It is used to match records using the C extension.
Class Method Summary collapse
Instance Method Summary collapse
-
#condition ⇒ Hash
The condition.
-
#context ⇒ Utils::Context
The context.
- #disable_trace ⇒ void
- #enable_trace ⇒ void
- #explain ⇒ void
-
#match?(record) ⇒ Boolean
True if the record matches the condition, false otherwise.
- #print_trace ⇒ void
-
#to_proc ⇒ Proc
A Proc that performs the matching operation.
-
#trace ⇒ Boolean
True if the record matches the condition, false otherwise.
Class Method Details
.new(condition) ⇒ Mongory::CMatcher
This method is implemented in the C extension
Returns a new matcher.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
.trace_result_colorful=(colorful) ⇒ void
This method is implemented in the C extension
This method returns an undefined value.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
Instance Method Details
#condition ⇒ Hash
This method is implemented in the C extension
Returns the condition.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#context ⇒ Utils::Context
This method is implemented in the C extension
Returns the context.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#disable_trace ⇒ void
This method will disable trace
This method is implemented in the C extension
This method returns an undefined value.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#enable_trace ⇒ void
This method will enable trace
This method is implemented in the C extension
This method returns an undefined value.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#explain ⇒ void
This method will print matcher tree structure
This method is implemented in the C extension
This method returns an undefined value.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#match?(record) ⇒ Boolean
This method is implemented in the C extension
Returns true if the record matches the condition, false otherwise.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#print_trace ⇒ void
This method will print trace result
This method is implemented in the C extension
This method returns an undefined value.
|
# File 'lib/mongory/c_matcher.rb', line 12
|
#to_proc ⇒ Proc
Returns a Proc that performs the matching operation.
53 54 55 |
# File 'lib/mongory/c_matcher.rb', line 53 def to_proc Proc.new { |record| match?(record) } end |
#trace ⇒ Boolean
This method will print matching process
This method is implemented in the C extension
Returns true if the record matches the condition, false otherwise.
|
# File 'lib/mongory/c_matcher.rb', line 12
|