method
interactive
v1_9_3_125 -
Show latest stable
- Class:
RDoc::RI::Driver
interactive()public
Runs ri interactively using Readline if it is available.
# File lib/rdoc/ri/driver.rb, line 860
def interactive
puts "\nEnter the method name you want to look up."
if defined? Readline then
Readline.completion_proc = method :complete
puts "You can use tab to autocomplete."
end
puts "Enter a blank line to exit.\n\n"
loop do
name = if defined? Readline then
Readline.readline ">> "
else
print ">> "
$stdin.gets
end
return if name.nil? or name.empty?
name = expand_name name.strip
begin
display_name name
rescue NotFoundError => e
puts e.message
end
end
rescue Interrupt
exit
end Related methods
- Instance methods
- add_also_in
- add_class
- add_from
- add_includes
- add_method_list
- ancestors_of
- class_cache
- class_document
- classes
- classes_and_includes_for
- complete
- display
- display_class
- display_method
- display_name
- display_names
- expand_class
- expand_name
- filter_methods
- find_methods
- formatter
- in_path?
- interactive
- list_known_classes
- list_methods_matching
- load_method
- load_methods_matching
- method_document
- method_type
- name_regexp
- page
- paging?
- parse_name
- run
- setup_pager
- Class methods
- default_options
- dump
- new
- process_args
- run