Outputs formatted RI data for the class or method
name.
Returns true if name was found, false if it was not an alternative
could be guessed, raises an error if name couldn’t be guessed.
# File lib/rdoc/ri/driver.rb, line 810
def display_name name
if name =~ /\w:(\w|$)/ then
display_page name
return true
end
return true if display_class name
display_method name if name =~ /::|#|\./
true
rescue NotFoundError
matches = list_methods_matching name if name =~ /::|#|\./
matches = classes.keys.grep(/^#{Regexp.escape name}/) if matches.empty?
raise if matches.empty?
page do |io|
io.puts "#{name} not found, maybe you meant:"
io.puts
io.puts matches.sort.join("\n")
end
false
end