Sha256: 7529c9f4b4e821682ca411427b6a588facde0a37d1419f25713f60c79a702837
Contents?: true
Size: 572 Bytes
Versions: 41
Compression:
Stored size: 572 Bytes
Contents
module Startback module Support class TransactionManager def initialize(db, method = :transaction) @db = db @method = method end def call(runner, op, &then_block) raise ArgumentError, "A block is required" unless then_block before = (op.class.transaction_policy == :before_call) if before @db.send(@method) do then_block.call end else then_block.call end end end # class TransactionManager end # module Support end # module Startback
Version data entries
41 entries across 41 versions & 3 rubygems