Class: MongoMapper::Query
Instance Method Summary collapse
-
#initialize(model, options = {}) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(model, options = {}) ⇒ Query
Returns a new instance of Query.
4 5 6 7 8 9 |
# File 'lib/mongo_mapper/query.rb', line 4 def initialize(model, ={}) raise ArgumentError, "Options must be a hash" unless .is_a?(Hash) @model, @options, @conditions = model, {}, {} query.update() add_sci_condition end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
12 13 14 |
# File 'lib/mongo_mapper/query.rb', line 12 def method_missing(method, *args, &block) query.send(method, *args, &block) end |