Imported File#ftype spec from rubyspecs.
[rbx.git] / lib / irb / cmd / help.rb
blob866bf34980afc52e5701a9f95179b0484d1903a7
2 #   help.rb - helper using ri
3 #       $Release Version: 0.9.5$
4 #       $Revision: 11708 $
5 #       $Date: 2007-02-12 15:01:19 -0800 (Mon, 12 Feb 2007) $
7 # --
9 #   
12 require 'rdoc/ri/ri_driver'
14 module IRB
15   module ExtendCommand
16     module Help
17       begin
18         @ri = RiDriver.new
19       rescue SystemExit
20       else
21         def self.execute(context, *names)
22           names.each do |name|
23             begin
24               @ri.get_info_for(name.to_s)
25             rescue RiError
26               puts $!.message
27             end
28           end
29           nil
30         end
31       end
32     end
33   end
34 end