module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount

@api private

Identifies repetitions ‘{c}send` calls with no arguments:

foo.bar
foo.bar # => repeated
foo.bar.baz.qux # => inner send repeated
foo.bar.baz.other # => both inner send repeated
foo.bar(2) # => not repeated

It also invalidates sequences if a receiver is reassigned:

xx.foo.bar
xx.foo.baz      # => inner send repeated
self.xx = any   # => invalidates everything so far
xx.foo.baz      # => no repetition
self.xx.foo.baz # => all repeated