Class: DatabaseCleaner::Sequel::Transaction
- Inherits:
-
Object
- Object
- DatabaseCleaner::Sequel::Transaction
- Includes:
- Base
- Defined in:
- lib/database_cleaner/sequel/transaction.rb
Instance Method Summary collapse
Methods included from Base
Methods included from Generic::Base
Instance Method Details
#clean ⇒ Object
19 20 21 22 |
# File 'lib/database_cleaner/sequel/transaction.rb', line 19 def clean f= @fibers.pop f.resume end |
#start ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/database_cleaner/sequel/transaction.rb', line 7 def start @fibers||= [] db= self.db f= Fiber.new do db.transaction(:rollback => :always, :savepoint => true) do Fiber.yield end end f.resume @fibers<< f end |