rubocop
https://github.com/bbatsov/rubocop
Ruby
A Ruby static code analyzer, based on the community Ruby style guide.
RuboCop::Cop::VariableForce::Reference#explicit?
There's an implicit variable reference by the zero-arity `super`:
def some_method(foo)
super
end
Another case is `binding`:
def some_method(foo)
do_something(binding)
end
In these cases, the variable `foo` is not explicitly referenced,
but it can be considered used implicitly by the `super` or `binding`.Edit
git clone [email protected]:bbatsov/rubocop.git
cd rubocop
open lib/rubocop/cop/variable_force/reference.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-RuboCop--Cop--VariableForce--Reference-explicit--for-pr
# Commit to gitgit add lib/rubocop/cop/variable_force/reference.rbgit commit -m "better docs for RuboCop::Cop::VariableForce::Reference#explicit?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-RuboCop--Cop--VariableForce--Reference-explicit--for-pr
hub pull-request
# Celebrate!