1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/lib/irb/cmd/help.rb
matz 4514a6bee6 * lib/irb/cmd/help.rb: should be updated for new ri structure.
[ruby-core:15825]

* lib/rdoc/ri/driver.rb (RDoc::initialize): allow options to be optional.

* lib/rdoc/ri/driver.rb (RDoc::class_cache): map_dirs may be
  empty.

* lib/rdoc/ri/driver.rb (RDoc::get_info_for): revive get_info_for
  method.  maybe broken.

* lib/rdoc/ri/util.rb (RDoc::initialize): should not use RiError
  no more.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12 18:13:48 +00:00

34 lines
558 B
Ruby

#
# help.rb - helper using ri
# $Release Version: 0.9.5$
# $Revision$
#
# --
#
#
#
require 'rdoc/ri/driver'
require 'rdoc/ri/util'
module IRB
module ExtendCommand
module Help
begin
@ri = RDoc::RI::Driver.new
rescue SystemExit
else
def self.execute(context, *names)
names.each do |name|
begin
@ri.get_info_for(name.to_s)
rescue RDoc::RI::Error
puts $!.message
end
end
nil
end
end
end
end
end