Method: Candy::Collection#initialize
- Defined in:
- lib/candy/collection.rb
#initialize(*args, &block) ⇒ Object
Here endeth the ClassMethods module
58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/candy/collection.rb', line 58 def initialize(*args, &block) conditions = args.pop || {} super @_candy_query = {} if conditions.is_a?(Hash) @_candy_options = {:fields => '_id'}.merge((conditions)) @_candy_query.merge!(conditions) else @_candy_options = {:fields => '_id'} end refresh_cursor end |