Sha256: 8e88a3bea199147b845de272cce6a586856b2592166abe16697139d37f5f81f2

Contents?: true

Size: 240 Bytes

Versions: 16

Compression:

Stored size: 240 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

16 entries across 16 versions & 1 rubygems

Version Path
volt-0.7.16 app/volt/tasks/live_query/data_store.rb
volt-0.7.15 app/volt/tasks/live_query/data_store.rb
volt-0.7.14 app/volt/tasks/live_query/data_store.rb
volt-0.7.13 app/volt/tasks/live_query/data_store.rb
volt-0.7.12 app/volt/tasks/live_query/data_store.rb
volt-0.7.10 app/volt/tasks/live_query/data_store.rb
volt-0.7.9 app/volt/tasks/live_query/data_store.rb
volt-0.7.8 app/volt/tasks/live_query/data_store.rb
volt-0.7.7 app/volt/tasks/live_query/data_store.rb
volt-0.7.6 app/volt/tasks/live_query/data_store.rb
volt-0.7.5 app/volt/tasks/live_query/data_store.rb
volt-0.7.4 app/volt/tasks/live_query/data_store.rb
volt-0.7.3 app/volt/tasks/live_query/data_store.rb
volt-0.7.2 app/volt/tasks/live_query/data_store.rb
volt-0.7.1 app/volt/tasks/live_query/data_store.rb
volt-0.7.0 app/volt/tasks/live_query/data_store.rb