module Moongoon

Overview

Moongoon is a MongoDB object-document mapper library.

Extended Modules

Defined in:

Constant Summary

Log = ::Log.for(self)

Class Method Summary

Class Method Detail

def self.client : Mongo::Client #

Retrieves the mongodb driver client that can be used to perform low level queries

See: https://github.com/elbywan/cryomongo

cursor = Moongoon.client["database"]["collection"].find({ "key": value })
puts cursor.to_a

def self.client? : Mongo::Client? #

Retrieves the mongodb driver client that can be used to perform low level queries

See: https://github.com/elbywan/cryomongo

cursor = Moongoon.client["database"]["collection"].find({ "key": value })
puts cursor.to_a

def self.config #

def self.configure(&) #

def self.database #

The default database instance that can be used to perform low level queries.

See: https://github.com/elbywan/cryomongo

db = Moongoon.database
collection = db["some_collection"]
data = collection.find query
pp data

def self.database_name : String #

The name of the default database.


def self.database_name? : String? #

The name of the default database.