Display a list of methods and allow the user to select one of
them.
# File lib/rdoc/ri/display.rb, line 275
def display_method_list_choice(methods)
page do
@formatter.wrap "More than one method matched your request. Please choose one of the possible matches."
@formatter.blankline
methods.each_with_index do |method, index|
@formatter.raw_print_line "%3d %s [%s]\n" % [index + 1, method.full_name, method.source_path]
end
@formatter.raw_print_line ">> "
choice = $stdin.gets.strip!
if(choice == '')
return
end
choice = choice.to_i
if ((choice == 0) || (choice > methods.size)) then
@formatter.raw_print_line "Invalid choice!\n"
else
method = methods[choice - 1]
display_method_info(method)
end
end
end