Module: DatabaseCleaner::Moped::TruncationBase
- Includes:
- Generic::Truncation, Base
- Included in:
- DatabaseCleaner::Mongoid::Truncation, Truncation
- Defined in:
- lib/database_cleaner/moped/truncation_base.rb
Instance Method Summary collapse
Methods included from Generic::Truncation
Methods included from Base
#db, #db=, #host, #host_port=
Methods included from Generic::Base
Instance Method Details
#clean ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/database_cleaner/moped/truncation_base.rb', line 10 def clean if @only collections.each { |c| session[c].find.remove_all if @only.include?(c) } else collections.each { |c| session[c].find.remove_all unless @tables_to_exclude.include?(c) } end true end |