Sha256: bb320bfb8cffb4848f3ae55c2820403a79fc3d4354301cb5988c1f68b163792a
Contents?: true
Size: 705 Bytes
Versions: 3
Compression:
Stored size: 705 Bytes
Contents
require "dry/monads/either" 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.send(:include, InstanceMethods) klass.send(:prepend, resolver_mod) klass.send(:include, Dry::Monads::Either::Mixin) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dry-transaction-0.10.2 | lib/dry/transaction/builder.rb |
dry-transaction-0.10.1 | lib/dry/transaction/builder.rb |
dry-transaction-0.10.0 | lib/dry/transaction/builder.rb |