summaryrefslogtreecommitdiff
path: root/lib/irb/cmd
diff options
context:
space:
mode:
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
commit40906c5d5d09837d005a7503fcf8c3f96cee111d (patch)
tree298830044e8759762a62ba2d671a693133b35bad /lib/irb/cmd
parenta5d09ee942fe078c5b8f63ec7d2462253687fefe (diff)
This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/cmd')
-rw-r--r--lib/irb/cmd/help.rb34
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 0000000000..3e8d1388e0
--- /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