In the documentation of dry-transaction sectionCustom step adapters there is a code snippet:
QUEUE = []
class MyStepAdapters < Dry::Transaction::StepAdapters
register :enqueue, -> step, input, *args {
# In a real app, this would push the operation into a background worker queue
QUEUE << step.operation.call(input, *args)
Dry::Monads.Success(input)
}
end
However actual interface is different.
To Reproduce
Expected behavior
Code snippet in documentation needs to be updated to something like:
QUEUE = []
class MyStepAdapters < Dry::Transaction::StepAdapters
register :enqueue, ->(operation, _options, args) {
# In a real app, this would push the operation into a background worker queue
QUEUE << operation.call(*args))
Dry::Monads.Success(input)
}
end
Also text describing interface (#call(step, input, *args)) needs to be updated accordingly.
Describe the bug
In the documentation of
dry-transaction section
Custom step adapters
there is a code snippet:However actual interface is different.
To Reproduce
Expected behavior
Code snippet in documentation needs to be updated to something like:
Also text describing interface (
#call(step, input, *args)
) needs to be updated accordingly.Your environment