Sha256: 205b94b9d08f4fc8affe9dcb9c09b3b3566759f34ece8da885af636b8f0956e1

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

require 'mongo'

module Pokeplot
  module Database

    @@mongo_host = '127.0.0.1:27017'

    def self.mongo
      Mongo::Logger.level = Logger::FATAL
      return Mongo::Client.new([ @@mongo_host ], :database => 'pokeplot')
    end

    def self.mongo_host=(host)
      @@mongo_host = host
    end

    def self.mongo_monitor(class_instance)
      Mongo::Monitoring::Global.subscribe(Mongo::Monitoring::COMMAND, class_instance)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pokeplot-0.2.1beta lib/pokeplot/database.rb
pokeplot-0.2.0beta lib/pokeplot/database.rb