This class represents each reference of a variable.
# File lib/rubocop/cop/variable_force/reference.rb, line 17 def initialize(node, scope) unless VARIABLE_REFERENCE_TYPES.include?(node.type) fail ArgumentError, "Node type must be any of #{VARIABLE_REFERENCE_TYPES}, " "passed #{node.type}" end @node = node @scope = scope end
There's an implicit variable reference by the zero-arity `super`:
def some_method(foo) super end
In this case, the variable `foo` is not explicitly referenced, but it can be considered used implicitly by the `super`.
# File lib/rubocop/cop/variable_force/reference.rb, line 36 def explicit? @node.type != ZERO_ARITY_SUPER_TYPE end
Generated with the Darkfish Rdoc Generator 2.