Class: ROM::Transaction Private

Inherits:
Object
  • Object
show all
Defined in:
core/lib/rom/transaction.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

Rollback =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Class.new(StandardError)
NoOp =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Transaction.new.freeze

Instance Method Summary collapse

Instance Method Details

#rollback!Object

Unconditionally roll back the current transaction

Raises:



19
20
21
# File 'core/lib/rom/transaction.rb', line 19

def rollback!
  raise Rollback
end

#run(_opts = EMPTY_HASH) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
# File 'core/lib/rom/transaction.rb', line 10

def run(_opts = EMPTY_HASH)
  yield(self)
rescue Rollback
  # noop
end