Module: MongoThing
- Defined in:
- lib/mongo_thing.rb,
lib/mongo_thing/cursor.rb,
lib/mongo_thing/railtie.rb,
lib/mongo_thing/document.rb,
lib/mongo_thing/nested_ostruct.rb,
lib/mongo_thing/railties/document.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Document Classes: Cursor, NestedOpenStruct, Railtie
Class Attribute Summary collapse
-
.connection ⇒ Object
Returns the value of attribute connection.
-
.db ⇒ Object
Returns the value of attribute db.
Class Method Summary collapse
Class Attribute Details
.connection ⇒ Object
Returns the value of attribute connection.
39 40 41 |
# File 'lib/mongo_thing.rb', line 39 def connection @connection end |
.db ⇒ Object
Returns the value of attribute db.
39 40 41 |
# File 'lib/mongo_thing.rb', line 39 def db @db end |
Class Method Details
.drop_non_system_collections ⇒ Object
61 62 63 |
# File 'lib/mongo_thing.rb', line 61 def drop_non_system_collections db.collections.each{|col| col.drop unless col.name =~ /^system\./ } if db end |