Add a needs_context :key1, :key2, :key3... method to
support basic context contract verification / checking.
By including the ContextValidation module in your interactor
class, you get to declare what items in the context are
actually required for the interactor to work correctly.
If someone tries to use an interactor without passing it
any one of the required items, an error is raised.
Add a
needs_context :key1, :key2, :key3...
method to support basic context contract verification / checking.By including the
ContextValidation
module in your interactor class, you get to declare what items in the context are actually required for the interactor to work correctly.If someone tries to use an interactor without passing it any one of the required items, an error is raised.