diff options
| author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-19 19:24:59 +0000 |
|---|---|---|
| committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-04-19 19:24:59 +0000 |
| commit | ddd765dbbd0721a8050e00108a7ee9e8a19e90d6 (patch) | |
| tree | 298830044e8759762a62ba2d671a693133b35bad /lib/irb/cmd/help.rb | |
| parent | 24224e23d9f591f20c57eab582411f2eb7af49a9 (diff) | |
| download | ruby-ddd765dbbd0721a8050e00108a7ee9e8a19e90d6.tar.gz ruby-ddd765dbbd0721a8050e00108a7ee9e8a19e90d6.tar.xz ruby-ddd765dbbd0721a8050e00108a7ee9e8a19e90d6.zip | |
This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/cmd/help.rb')
| -rw-r--r-- | lib/irb/cmd/help.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/irb/cmd/help.rb b/lib/irb/cmd/help.rb new file mode 100644 index 000000000..3e8d1388e --- /dev/null +++ b/lib/irb/cmd/help.rb @@ -0,0 +1,34 @@ +# +# help.rb - helper using ri +# $Release Version: 0.9.5$ +# $Revision$ +# $Date$ +# +# -- +# +# +# + +require 'rdoc/ri/ri_driver' + +module IRB + module ExtendCommand + module Help + begin + @ri = RiDriver.new + rescue SystemExit + else + def self.execute(context, *names) + names.each do |name| + begin + @ri.get_info_for(name.to_s) + rescue RiError + puts $!.message + end + end + nil + end + end + end + end +end |
