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 682
def display_name name
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(/^#{name}/) if matches.empty?
raise if matches.empty?
page do |io|
io.puts "#{name} not found, maybe you meant:"
io.puts
io.puts matches.join("\n")
end
false
end