Open cabello opened 6 years ago
I think this would be a worthwhile addition. I've just added comments at the top of the class about what's required input and what is expected output. Defining it might clean up some of the boilerplate code I create like this:
if context.location.blank? || context.calibration.blank?
Rails.logger.info 'AddCalibrationLocation [ SKIPPED - MISSING INFO ]'
return false
end
Hey, take a look at Hanami::Interactor - it's simpler than collectiveidea's interactor (no Organizaer, callbacks, rollback) but thanks to its API you can clearly see the input and the output :)
You could also try this out: https://github.com/michaelherold/interactor-contracts
It takes what light-service does, and quite a bit further.
Hi 👋
I recently found this gem https://github.com/adomokos/light-service and one thing I liked was the fact that you can specify what's expected from the context and what will be set on the context.
I've been doing
delegate
calls to mimic theexpects
functionality, I have nothing for the promises.Is that something you would welcome a PR for?