Sha256: 7a4b122d0071c0f9766833dc4aff83ff228d26b26c30ee14ceb2797104a9c109
Contents?: true
Size: 841 Bytes
Versions: 2
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true class Grumlin::TraversalStart < Grumlin::Steppable include Grumlin::WithExtension class TraversalError < Grumlin::Error; end class AlreadyBoundToTransactionError < TraversalError; end def tx raise AlreadyBoundToTransactionError if @session_id transaction = tx_class.new(self.class, pool: @pool, middlewares: @middlewares) return transaction unless block_given? begin yield transaction.begin rescue Grumlin::Rollback transaction.rollback rescue StandardError transaction.rollback raise else transaction.commit end end def to_s(*) self.class.to_s end def inspect self.class.inspect end private def tx_class Grumlin.features.supports_transactions? ? Grumlin::Transaction : Grumlin::DummyTransaction end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
grumlin-1.0.0.rc2 | lib/grumlin/traversal_start.rb |
grumlin-1.0.0.rc1 | lib/grumlin/traversal_start.rb |