class Steep::Index::SourceIndex

def reference(constant_node: nil)

def reference(constant_node: nil)
  case
  when constant_node
    constant_index.each do |name, entry|
      if entry.references.include?(constant_node)
        return name
      end
      if entry.definitions.include?(constant_node)
        return name
      end
    end
    nil
  end
end