Class: Saviour::DbHelpers::CommitDummy

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

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ CommitDummy

Returns a new instance of CommitDummy.



8
9
10
# File 'lib/saviour/db_helpers.rb', line 8

def initialize(block)
  @block = block
end

Instance Method Details

#before_committed!Object



19
20
# File 'lib/saviour/db_helpers.rb', line 19

def before_committed!(*)
end

#close_transactionObject



16
17
# File 'lib/saviour/db_helpers.rb', line 16

def close_transaction(*)
end

#committed!Object



22
23
24
# File 'lib/saviour/db_helpers.rb', line 22

def committed!(*)
  @block.call
end

#rolledback!Object



12
13
14
# File 'lib/saviour/db_helpers.rb', line 12

def rolledback!(*)
  close_transaction
end

#trigger_transactional_callbacks?Boolean

Returns:

  • (Boolean)


26
27
# File 'lib/saviour/db_helpers.rb', line 26

def trigger_transactional_callbacks?(*)
end