Class: Dry::Mutations::Transactions::Chain
- Inherits:
-
StepAdapters::Move
- Object
- StepAdapters::Move
- Dry::Mutations::Transactions::Chain
- Defined in:
- lib/dry/mutations/transactions/step_adapters/chain.rb
Overview
dry-rb.org/gems/dry-transaction/custom-step-adapters/ step adapters must provide a single ‘#call(step, *args, input)` method,
which should return the step’s result wrapped in an `Either` object.
This one is a wrapper for neted chains
Instance Method Summary collapse
Methods inherited from StepAdapters::Move
Instance Method Details
#call(step, *args, input) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dry/mutations/transactions/step_adapters/chain.rb', line 9 def call(step, *args, input) if step.block Class.new do extend ::Dry::Mutations::Transactions::DSL chain(&step.block) end.(input, *args) else super end end |