-
Notifications
You must be signed in to change notification settings - Fork 215
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
Add inheritance for hooks #138
Conversation
👍 |
@laserlemon Could this be merged in. Would make the Interactor classes more intuitive. |
Could you please try to add some tests that assert that hooks added to the child class are not also added to the parent? Also, the implementation is a little verbose. Isn't there some cool |
@laserlemon looks like @vsh91 added those specs, could this be merged (and version bumped) i'm using interactor in a gemspec and can only link to a rubygem (have been using github/ref in the Gemfile but that's no longer possible). many thanks. |
I think we should add hooks belonging to all ancestors (in proper order), not just those that belong to the (immediate) superclass. Ancestors also include the modules that a class has included, btw. |
hey @arpitchauhan . Although I'm more fan of using
but I have to admit, that @vsh91 approach works too. I added extra tests for "deep inheritance" case and it seems that it works: vsh91#1 Can you provide any example where @vsh91 approach fails? |
@laserlemon this PR is opened for almost 2 years. Can we merge this feature? |
@laserlemon please merge this :) |
What's the holdup in merging this? This has been open for over five and a half years and is currently causing issues for the project I'm working on. |
Hey,
First off, thank you for gem.
This pull request is going to fix the bug with hooks inheritance #114
Best,
Viktor