Module: MongoScript

Includes:
Execution, Multiquery
Defined in:
lib/mongoscript.rb,
lib/mongoscript/execution.rb,
lib/mongoscript/multiquery.rb,
lib/mongoscript/orm/mongoid_adapter.rb

Defined Under Namespace

Modules: Execution, Multiquery, ORM Classes: NoORMError

Constant Summary

Constants included from Execution

Execution::LOADED_SCRIPTS

Class Method Summary collapse

Methods included from Multiquery

included

Methods included from Execution

included

Class Method Details

.orm_adapterObject

Returns the MongoScript adapter module for whichever Mongo ORM is loaded (Mongoid, MongoMapper).

@note: currently only Mongoid is supported.



17
18
19
20
21
22
23
# File 'lib/mongoscript.rb', line 17

def self.orm_adapter
  if const_defined? "Mongoid"
    MongoScript::ORM::MongoidAdapter
  else
    raise NoORMError, "Unable to locate Mongoid!"
  end
end