Sha256: 074950f478d96b856344131fc92d1532be5386e3769b044ddf010a3d9aeb71fe

Contents?: true

Size: 377 Bytes

Versions: 10

Compression:

Stored size: 377 Bytes

Contents

module ActiveGraph
  module Transaction
    def failure
      super
      @failure = true
    end

    def close
      success
      super
      after_commit_registry.each(&:call) unless @failure
    end

    def after_commit(&block)
      after_commit_registry << block
    end

    private

    def after_commit_registry
      @after_commit_registry ||= []
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
activegraph-10.0.1 lib/active_graph/transaction.rb
activegraph-10.0.0 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.11 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.10 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.9 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.8 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.7 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.6 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.5 lib/active_graph/transaction.rb
activegraph-10.0.0.pre.beta.4 lib/active_graph/transaction.rb