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
TrivialAccessors complains with
Use attr_writer to define trivial writer methods. def bar=(new_bar) ^^^
in a case like
module Foo module_function def bar=(new_bar) @bar = new_bar end end module Bar module_function attr_writer :foo end Foo.bar = 'works' Bar.foo = "this doesn't"
but ruby will complain with
undefined method `foo=' for Bar:Module (NoMethodError)
when following TrivialAccessors advice.
TrivialAccessors
PS: @bbatsov thank you for your work! I love rubo:cop:!
The text was updated successfully, but these errors were encountered:
Ah, yeah. Seems the best solution would be to simply ignore modules altogether in this cop.
Alternative suggestions are welcome.
Sorry, something went wrong.
I guess it would be the simplest solution for now so… yes
98b4f13
No branches or pull requests
TrivialAccessors complains with
in a case like
but ruby will complain with
when following
TrivialAccessors
advice.PS: @bbatsov thank you for your work! I love rubo:cop:!
The text was updated successfully, but these errors were encountered: