Class: DataStore
Instance Method Summary collapse
-
#initialize ⇒ DataStore
constructor
A new instance of DataStore.
- #query(collection, query) ⇒ Object
Constructor Details
Instance Method Details
#query(collection, query) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/volt/tasks/live_query/data_store.rb', line 8 def query(collection, query) query = query.dup query.keys.each do |key| if key =~ /_id$/ # query[key] = BSON::ObjectId(query[key]) end end @@db[collection].find(query).to_a end |