This method is deprecated or moved on the latest stable version.
The last existing version (v1_9_1_378) is shown here.
potentially_referenced_list(array)
public
Build a list from an array of Context items. Look up each in the AllReferences hash: if we
find a corresponding entry, we generate a hyperlink to it, otherwise just
output the name. However, some names potentially need massaging. For
example, you may require a Ruby file
without the .rb extension, but the file names we know about may have it. To
deal with this, we pass in a block which performs the massaging, returning
an array of alternative names to match
# File lib/rdoc/generator.rb, line 281
def potentially_referenced_list(array)
res = []
array.each do |i|
ref = AllReferences[i.name]
# if !ref
# container = @context.parent
# while !ref && container
# name = container.name + "::" + i.name
# ref = AllReferences[name]
# container = container.parent
# end
# end
ref = @context.find_symbol(i.name)
ref = ref.viewer if ref
if !ref && block_given?
possibles = yield(i.name)
while !ref and !possibles.empty?
ref = AllReferences[possibles.shift]
end
end
h_name = CGI.escapeHTML(i.name)
if ref and ref.document_self
path = url(ref.path)
res << { "name" => h_name, "aref" => path }
else
res << { "name" => h_name }
end
end
res
end