Class: DatabaseCleaner::Sequel::Truncation

Inherits:
Object
  • Object
show all
Includes:
Generic::Truncation, Base
Defined in:
lib/database_cleaner/sequel/truncation.rb

Instance Method Summary collapse

Methods included from Generic::Truncation

#initialize, #start

Methods included from Base

#db, #db=

Methods included from Generic::Base

#db, included

Instance Method Details

#clean ⇒ Object



10
11
12
13
14
# File 'lib/database_cleaner/sequel/truncation.rb', line 10

def clean
  each_table do |db, table|
    db[table].truncate
  end
end

#each_table ⇒ Object



16
17
18
19
20
# File 'lib/database_cleaner/sequel/truncation.rb', line 16

def each_table
  tables_to_truncate(db).each do |table|
    yield db, table
  end
end