dry-rb / dry-transaction

Business transaction DSL
http://dry-rb.org/gems/dry-transaction
MIT License
468 stars 55 forks source link

Use dedicated method to "curry" a transaction with step args #51

Closed timriley closed 7 years ago

timriley commented 7 years ago

The problem with having step args be provided as part of Transaction#call is that it makes it harder to cleanly determine just what the proper input value should be. I think it'd be better to "curry" a transaction with step args via a separate method first, and then call on the resulting object, something like this:

my_transaction.step_args(
  step_one: [some, args],
  step_two: [more, args: "here"],
).call(my_input, is: "complex")
timriley commented 7 years ago

We've released this as part of 0.10.0, #with_step_args