Sha256: c83d65e03242d29c937cc9e7351f205ce6141d310d75dafb5945a40d785fa307
Contents?: true
Size: 574 Bytes
Versions: 7
Compression:
Stored size: 574 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop # Common functionality for checking assignment nodes. module CheckAssignment TYPES = Util::ASGN_NODES - [:casgn, :op_asgn] TYPES.each do |type| define_method("on_#{type}") do |node| _lhs, rhs = *node check_assignment(node, rhs) end end def on_casgn(node) _scope, _lhs, rhs = *node check_assignment(node, rhs) end def on_op_asgn(node) _lhs, _op, rhs = *node check_assignment(node, rhs) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems