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
class Test def self.inherited(klass) klass.define_method(:values) do @values ||= do_something end end inherited(self) end
Memoized variable @values matches method name values.
values
Rebocop reports an offence:
Naming/MemoizedInstanceVariableName: Memoized variable @values does not match method name inherited. Use @inherited instead.
bundle exec rubocop -V 1.6.1 (using Parser 2.7.2.0, rubocop-ast 1.3.0, running on ruby 2.6.6 x86_64-linux-musl)
The text was updated successfully, but these errors were encountered:
Naming/MemoizedInstanceVariableName
[Fix rubocop#9205] Update Naming/MemoizedInstanceVariableName to ha…
c48cb79
…ndle dynamically defined methods.
Merge pull request #9210 from dvandersluis/issue/9205
fc2ef9b
[Fix #9205] Update `Naming/MemoizedInstanceVariableName` to handle dynamically defined methods
Successfully merging a pull request may close this issue.
Expected behavior
Memoized variable @values matches method name
values
.Actual behavior
Rebocop reports an offence:
Naming/MemoizedInstanceVariableName: Memoized variable @values does not match method name inherited. Use @inherited instead.
RuboCop version
The text was updated successfully, but these errors were encountered: