Class: Perpetuity::MongoDB::Query
- Inherits:
-
Object
- Object
- Perpetuity::MongoDB::Query
- Defined in:
- lib/perpetuity/mongodb/query.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Query
constructor
A new instance of Query.
- #method_missing(missing_method) ⇒ Object
- #to_db ⇒ Object
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
14 15 16 |
# File 'lib/perpetuity/mongodb/query.rb', line 14 def method_missing missing_method QueryAttribute.new missing_method end |
Instance Method Details
#to_db ⇒ Object
10 11 12 |
# File 'lib/perpetuity/mongodb/query.rb', line 10 def to_db @query.to_db end |