aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/markup/list.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 04:28:14 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-27 04:28:14 +0000
commit1c279a7d2753949c725754e1302f791b76358114 (patch)
tree36aa3bdde250e564445eba5f2e25fcb96bcb6cef /lib/rdoc/markup/list.rb
parentc72f0daa877808e4fa5018b3191ca09d4b97c03d (diff)
downloadruby-1c279a7d2753949c725754e1302f791b76358114.tar.gz
* lib/rdoc*: Updated to RDoc 4.0 (pre-release)
* bin/rdoc: ditto * test/rdoc: ditto * NEWS: Updated with RDoc 4.0 information git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup/list.rb')
-rw-r--r--lib/rdoc/markup/list.rb28
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/rdoc/markup/list.rb b/lib/rdoc/markup/list.rb
index 820b4c9645..86ed845634 100644
--- a/lib/rdoc/markup/list.rb
+++ b/lib/rdoc/markup/list.rb
@@ -1,5 +1,24 @@
##
-# A List of ListItems
+# A List is a homogeneous set of ListItems.
+#
+# The supported list types include:
+#
+# :BULLET::
+# An unordered list
+# :LABEL::
+# An unordered definition list, but using an alternate RDoc::Markup syntax
+# :LALPHA::
+# An ordered list using increasing lowercase English letters
+# :NOTE::
+# An unordered definition list
+# :NUMBER::
+# An ordered list using increasing Arabic numerals
+# :UALPHA::
+# An ordered list using increasing uppercase English letters
+#
+# Definition lists behave like HTML definition lists. Each list item can
+# describe multiple terms. See RDoc::Markup::ListItem for how labels and
+# definition are stored as list items.
class RDoc::Markup::List
@@ -14,12 +33,13 @@ class RDoc::Markup::List
attr_reader :items
##
- # Creates a new list of +type+ with +items+
+ # Creates a new list of +type+ with +items+. Valid list types are:
+ # +:BULLET+, +:LABEL+, +:LALPHA+, +:NOTE+, +:NUMBER+, +:UALPHA+
def initialize type = nil, *items
@type = type
@items = []
- @items.push(*items)
+ @items.concat items
end
##
@@ -74,7 +94,7 @@ class RDoc::Markup::List
# Appends +items+ to the list
def push *items
- @items.push(*items)
+ @items.concat items
end
end