lib/reek/method_context.rb in reek-1.2.1 vs lib/reek/method_context.rb in reek-1.2.2
- old
+ new
@@ -83,9 +83,14 @@
@parameters.include?(sym.to_s)
end
def record_call_to(exp)
@calls[exp] += 1
+ record_receiver(exp)
+ check_for_attribute_declaration(exp)
+ end
+
+ def record_receiver(exp)
receiver, meth = exp[1..2]
receiver ||= [:self]
case receiver[0]
when :lvar
@refs.record_ref(receiver) unless meth == :new