Class: DatabaseCleaner::MongoMapper::Truncation
- Inherits:
-
Object
- Object
- DatabaseCleaner::MongoMapper::Truncation
- Includes:
- Generic::Truncation, Base
- Defined in:
- lib/database_cleaner/mongo_mapper/truncation.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#clean ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/database_cleaner/mongo_mapper/truncation.rb', line 10 def clean if @only collections.each { |c| c.send(truncate_method_name) if @only.include?(c.name) } else collections.each { |c| c.send(truncate_method_name) unless @tables_to_exclude.include?(c.name) } end true end |