Class: Dry::Transaction::Builder
- Inherits:
-
Module
- Object
- Module
- Dry::Transaction::Builder
- Defined in:
- lib/dry/transaction/builder.rb
Instance Attribute Summary collapse
-
#dsl_mod ⇒ Object
readonly
Returns the value of attribute dsl_mod.
-
#resolver_mod ⇒ Object
readonly
Returns the value of attribute resolver_mod.
Instance Method Summary collapse
- #included(klass) ⇒ Object
-
#initialize(step_adapters:, container: nil) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(step_adapters:, container: nil) ⇒ Builder
Returns a new instance of Builder.
14 15 16 17 18 |
# File 'lib/dry/transaction/builder.rb', line 14 def initialize(step_adapters:, container: nil) super() @dsl_mod = DSL.new(step_adapters: step_adapters) @resolver_mod = OperationResolver.new(container) end |
Instance Attribute Details
#dsl_mod ⇒ Object (readonly)
Returns the value of attribute dsl_mod.
11 12 13 |
# File 'lib/dry/transaction/builder.rb', line 11 def dsl_mod @dsl_mod end |
#resolver_mod ⇒ Object (readonly)
Returns the value of attribute resolver_mod.
12 13 14 |
# File 'lib/dry/transaction/builder.rb', line 12 def resolver_mod @resolver_mod end |
Instance Method Details
#included(klass) ⇒ Object
20 21 22 23 24 |
# File 'lib/dry/transaction/builder.rb', line 20 def included(klass) klass.extend(dsl_mod) klass.include(InstanceMethods) klass.prepend(resolver_mod) end |