Method: RuboCop::Cop::VariableForce::Reference#initialize
- Defined in:
- lib/rubocop/cop/variable_force/reference.rb
#initialize(node, scope) ⇒ Reference
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Reference.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rubocop/cop/variable_force/reference.rb', line 16 def initialize(node, scope) unless VARIABLE_REFERENCE_TYPES.include?(node.type) raise ArgumentError, "Node type must be any of #{VARIABLE_REFERENCE_TYPES}, " \ "passed #{node.type}" end @node = node @scope = scope end |