We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Util
Right now modules under Flows::Util work like "module patchers":
Flows::Util
module YourModule SomeStuffFromUtils.call(self, opts) end
I see this code as a very confusing one for an average Ruby developer.
In my opinion, the more ruby-friendly and less confusing way will be "module factory":
MyBehaviour = SomeStuffFromUtil.make_module(opts) module YourModule extend MyBehaviour end
Also, more condensed way of usage is possible:
module YourModule extend SomeStuffFromUtil.make_module(opts) end
But in this way, you'll have an anonymous module which can be inconvenient for backtrace readers and YARD documentation tool.
And it will be convenient if an error will be raised if you're including generated module instead of extending and vise versa.
The text was updated successfully, but these errors were encountered:
refactor!(#11): simplify PrependToClass API
a9504a4
refactor!(#11): simplify DupStrategy
451fbed
refactor!(#11): simplify IsolationStrategy
f9a790b
docs(#11): update CHANGELOG
0b7efae
refactor!(#11): Flows::Util API rework (#13)
a8d0f22
* refactor!(#11): simplify PrependToClass API * refactor!(#11): simplify DupStrategy * refactor!(#11): simplify IsolationStrategy * docs(#11): update CHANGELOG
ffloyd
Successfully merging a pull request may close this issue.
The problem
Right now modules under
Flows::Util
work like "module patchers":I see this code as a very confusing one for an average Ruby developer.
The solution
In my opinion, the more ruby-friendly and less confusing way will be "module factory":
Also, more condensed way of usage is possible:
But in this way, you'll have an anonymous module which can be inconvenient for backtrace readers and YARD documentation tool.
And it will be convenient if an error will be raised if you're including generated module instead of extending and vise versa.
The text was updated successfully, but these errors were encountered: