summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-16 20:28:44 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-16 20:28:44 +0000
commitbc8c73c42a552fcc1d414c3475c64099f5a246d6 (patch)
treeebee43a2f527178f880b89405e30d630158975b7 /bin
parent6ef31af2d178fb4916150d317ceafe156fccdf65 (diff)
Put RDoc comments into array.c, and refine rdoc/ri to deal with stuff that arose
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ri16
1 files changed, 12 insertions, 4 deletions
diff --git a/bin/ri b/bin/ri
index 899fc2d..c9c3abc 100755
--- a/bin/ri
+++ b/bin/ri
@@ -49,7 +49,9 @@ class RiDisplay
######################################################################
def display_params(method)
+
params = method.params
+
if params[0,1] == "("
if method.is_singleton
params = method.full_name + params
@@ -57,7 +59,7 @@ class RiDisplay
params = method.name + params
end
end
- @formatter.wrap(params)
+ params.split(/\n/).each {|p| @formatter.wrap(p) }
end
######################################################################
@@ -107,10 +109,16 @@ def display_class_info(class_entry)
end
end
- unless klass.method_list.empty?
+ unless klass.class_methods.empty?
+ @formatter.blankline
+ @formatter.wrap("Class methods:", "")
+ @formatter.wrap(klass.class_methods.map{|m| m.name}.sort.join(', '))
+ end
+
+ unless klass.instance_methods.empty?
@formatter.blankline
- @formatter.wrap("Methods:", "")
- @formatter.wrap(klass.method_list.map{|m| m.name}.sort.join(', '))
+ @formatter.wrap("Instance methods:", "")
+ @formatter.wrap(klass.instance_methods.map{|m| m.name}.sort.join(', '))
end
unless klass.attributes.empty?