2005-04-14 05:58:18 -04:00
|
|
|
#
|
|
|
|
# help.rb - helper using ri
|
|
|
|
# $Release Version: 0.9.5$
|
|
|
|
# $Revision$
|
|
|
|
#
|
|
|
|
# --
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2008-03-12 14:13:48 -04:00
|
|
|
require 'rdoc/ri/driver'
|
|
|
|
require 'rdoc/ri/util'
|
2004-02-05 19:16:50 -05:00
|
|
|
|
|
|
|
module IRB
|
|
|
|
module ExtendCommand
|
|
|
|
module Help
|
|
|
|
begin
|
2008-03-12 14:13:48 -04:00
|
|
|
@ri = RDoc::RI::Driver.new
|
2004-02-05 19:16:50 -05:00
|
|
|
rescue SystemExit
|
|
|
|
else
|
|
|
|
def self.execute(context, *names)
|
|
|
|
names.each do |name|
|
|
|
|
begin
|
|
|
|
@ri.get_info_for(name.to_s)
|
2008-03-12 14:13:48 -04:00
|
|
|
rescue RDoc::RI::Error
|
2004-02-05 19:16:50 -05:00
|
|
|
puts $!.message
|
|
|
|
end
|
|
|
|
end
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|