Class: DatabaseCleaner::MongoMapper::Truncation
- Inherits:
-
TruncationBase
- Object
- TruncationBase
- DatabaseCleaner::MongoMapper::Truncation
- Defined in:
- lib/database_cleaner/mongo_mapper/truncation.rb
Instance Method Summary collapse
Methods inherited from TruncationBase
Constructor Details
This class inherits a constructor from DatabaseCleaner::TruncationBase
Instance Method Details
#clean ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/database_cleaner/mongo_mapper/truncation.rb', line 6 def clean if @only collections.each { |c| c.remove if @only.include?(c.name) } else collections.each { |c| c.remove unless @tables_to_exclude.include?(c.name) } end true end |