Class: Perpetuity::MongoDB::Query
- Inherits:
-
Object
- Object
- Perpetuity::MongoDB::Query
show all
- Defined in:
- lib/perpetuity/mongodb/query.rb
Instance Method Summary
collapse
Constructor Details
#initialize(&block) ⇒ Query
Returns a new instance of Query.
6
7
8
|
# File 'lib/perpetuity/mongodb/query.rb', line 6
def initialize &block
@query = block.call(self)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(missing_method) ⇒ Object
18
19
20
|
# File 'lib/perpetuity/mongodb/query.rb', line 18
def method_missing missing_method
QueryAttribute.new missing_method
end
|
Instance Method Details
#negate ⇒ Object
14
15
16
|
# File 'lib/perpetuity/mongodb/query.rb', line 14
def negate
@query.negate
end
|
#to_db ⇒ Object
10
11
12
|
# File 'lib/perpetuity/mongodb/query.rb', line 10
def to_db
@query.to_db
end
|