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 Foo def foo(&blk) @foo = blk end def thing @foo.call(1) end end f = Foo.new f.foo { |x| x + 1 } puts f.thing
Suggests:
/tmp/a.rb:4:3: C: Use attr_writer to define trivial writer methods. def foo(&blk) ^^^
I tried an attr_writer just in case, but it didn't work 😸 .
attr_writer
$ rubocop --version 0.29.1 $ ruby --version ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
The text was updated successfully, but these errors were encountered:
793a2b8
No branches or pull requests
Suggests:
I tried an
attr_writer
just in case, but it didn't work 😸 .The text was updated successfully, but these errors were encountered: