I have a scenario where a transaction calls another transaction (which I am reusing elsewhere) and adds a parameter from the result of that transaction to the call to the next step. The code is as follows:
┆ def validate_attributes(gig:, indie:)
┆ ┆ Operations::ValidateGig.new.call(gig: gig).bind do |result_value|
gig = result_value.fetch(:gig)
┆ ┆ ┆ Success(gig: gig, indie: indie)
┆ ┆ end
┆ end
Is there a more elegant way that is recommended to accomplish the above? My worry is that I am using the library in a way that is not documented and this could possibly break in future versions.