Sha256: af055ecf0ac490e45b70a3b6bf55b54dd9753b296ee3daf541d68e743eb0c259
Contents?: true
Size: 920 Bytes
Versions: 9
Compression:
Stored size: 920 Bytes
Contents
# frozen_string_literal: true module Opera module Operation module Instructions module Executors class Transaction < Executor class RollbackTransactionError < Opera::Error; end def call(instruction) arguments = transaction_options ? [transaction_method, transaction_options] : [transaction_method] transaction_class.send(*arguments) do super return if !operation.finished? && result.success? raise(RollbackTransactionError) end rescue RollbackTransactionError nil end def transaction_class config.transaction_class end def transaction_method config.transaction_method end def transaction_options config.transaction_options end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems