class Reek::AST::ObjectRefs

ObjectRefs is used in CodeContexts. It manages and counts the references out of a method to other objects and to ‘self`.

E.g. this code:

def foo(thing)
  bar.call_me
  bar.maybe(thing.wat)
end

would make “@refs” below look like this after the TreeWalker has done his job:

{
  :self=>[2, 3], # `bar.call_me` and `bar.maybe` count as refs to `self` in line 2 and 3
  :thing=>[3]    # `thing.wat` in `bar.maybe()` counts as one reference to `thing`
}