Sha256: 12a31a0819bcd0619d5c9c9ffcc218a43c077869fb8f74031eba048b3bdd40ff

Contents?: true

Size: 606 Bytes

Versions: 6

Compression:

Stored size: 606 Bytes

Contents

require "dry/transaction/step"
require "dry/transaction/dsl"
require "dry/transaction/instance_methods"
require "dry/transaction/operation_resolver"

module Dry
  module Transaction
    class Builder < Module
      attr_reader :dsl_mod
      attr_reader :resolver_mod

      def initialize(container: nil, step_adapters:)
        @dsl_mod = DSL.new(step_adapters: step_adapters)
        @resolver_mod = OperationResolver.new(container)
      end

      def included(klass)
        klass.extend(dsl_mod)
        klass.include(InstanceMethods)
        klass.prepend(resolver_mod)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dry-transaction-0.13.0 lib/dry/transaction/builder.rb
dry-transaction-0.12.1 lib/dry/transaction/builder.rb
dry-transaction-0.12.0 lib/dry/transaction/builder.rb
dry-transaction-0.11.2 lib/dry/transaction/builder.rb
dry-transaction-0.11.1 lib/dry/transaction/builder.rb
dry-transaction-0.11.0 lib/dry/transaction/builder.rb