PageRenderTime 80ms CodeModel.GetById 75ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Ruby/lib/ruby/1.8/irb/cmd/help.rb

http://github.com/agross/netopenspace
Ruby | 34 lines | 22 code | 2 blank | 10 comment | 0 complexity | 5a8a28d4529c97732aa586948da6bd54 MD5 | raw file
 1#
 2#   help.rb - helper using ri
 3#   	$Release Version: 0.9.5$
 4#   	$Revision: 11708 $
 5#   	$Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
 6#
 7# --
 8#
 9#   
10#
11
12require 'rdoc/ri/ri_driver'
13
14module 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
34end