Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How know the class name of the interactor that it was executed after returns the context? #182

Open
memoxmrdl opened this issue Feb 25, 2020 · 1 comment

Comments

@memoxmrdl
Copy link

memoxmrdl commented Feb 25, 2020

For example:

> result = PlaceOrder.call
> result.class 
> Interactor::Context # I expect that it returns PlaceOrder but really it's the context
@sunny
Copy link

sunny commented Mar 5, 2020

I don't think it would make sense for it to return PlaceOrder, since it must return a context.

Should you want to know the name of the interactor after calling it you can always do something like:

interactor = PlaceOrder
interactor.call
interactor.class
# => PlaceOrder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants