Sha256: 92eb96fdd01bc3e8b51fd3b9cd3b3dee86b9af22039fe09741bd29205a49dc98

Contents?: true

Size: 241 Bytes

Versions: 6

Compression:

Stored size: 241 Bytes

Contents

require 'mongo'

class DataStore
  def initialize
    @@mongo_db ||= Mongo::MongoClient.new("localhost", 27017)
    @@db ||= @@mongo_db.db("development")
  end
  
  def query(collection, query)
    @@db[collection].find(query).to_a
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
volt-0.6.5 app/volt/tasks/live_query/data_store.rb
volt-0.6.4 app/volt/tasks/live_query/data_store.rb
volt-0.6.3 app/volt/tasks/live_query/data_store.rb
volt-0.6.2 app/volt/tasks/live_query/data_store.rb
volt-0.6.1 app/volt/tasks/live_query/data_store.rb
volt-0.6.0 app/volt/tasks/live_query/data_store.rb