class RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor
def check_body_lines(lines)
-
lines
(Array
) -- the logical lines of the constructor
def check_body_lines(lines) lines.each do |line| case line.type when :or_asgn check_disjunctive_assignment(line) else # Once we encounter something other than a disjunctive # assignment, we cease our investigation, because we can't be # certain that any future disjunctive assignments are offensive. # You're off the case, detective! break end end end