2005-04-14 05:58:18 -04:00
|
|
|
#
|
|
|
|
# help.rb - helper using ri
|
2009-07-07 07:36:20 -04:00
|
|
|
# $Release Version: 0.9.6$
|
2005-04-14 05:58:18 -04:00
|
|
|
# $Revision$
|
|
|
|
#
|
|
|
|
# --
|
|
|
|
#
|
2009-03-05 22:56:38 -05:00
|
|
|
#
|
2005-04-14 05:58:18 -04:00
|
|
|
#
|
|
|
|
|
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
|