    # File lib/yard/templates/helpers/html_helper.rb, line 245
          def link_object(obj, otitle = nil, anchor = nil, relative = true)
            return otitle if obj.nil?
            obj = Registry.resolve(object, obj, true, true) if obj.is_a?(String)
            if !otitle && obj.root?
              title = "Top Level Namespace"
            elsif otitle
              title = otitle.to_s
            elsif object.is_a?(CodeObjects::Base)
              # Check if we're linking to a class method in the current
              # object. If we are, create a title in the format of
              # "CurrentClass.method_name"
              if obj.is_a?(CodeObjects::MethodObject) && obj.scope == :class && obj.parent == object
                title = h([object.name, obj.sep, obj.name].join)
              else
                title = h(object.relative_path(obj))
              end
            else
              title = h(obj.to_s)
            end
            return title unless serializer
            return title if obj.is_a?(CodeObjects::Proxy)

            link = url_for(obj, anchor, relative)
            link = link ? link_url(link, title, :title => h("#{obj.path} (#{obj.type})")) : title
            "<span class='object_link'>" + link + "</span>"
          end