Class: Saviour::DbHelpers::RollbackDummy

Inherits:
Object
  • Object
show all
Defined in:
lib/saviour/db_helpers.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ RollbackDummy

Returns a new instance of RollbackDummy.



28
29
30
# File 'lib/saviour/db_helpers.rb', line 28

def initialize(block)
  @block = block
end

Instance Method Details

#before_committed!Object



40
41
# File 'lib/saviour/db_helpers.rb', line 40

def before_committed!(*)
end

#close_transactionObject



37
38
# File 'lib/saviour/db_helpers.rb', line 37

def close_transaction(*)
end

#committed!Object



43
44
# File 'lib/saviour/db_helpers.rb', line 43

def committed!(*)
end

#rolledback!Object



32
33
34
35
# File 'lib/saviour/db_helpers.rb', line 32

def rolledback!(*)
  @block.call
  close_transaction
end