aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/markup/list.rb
diff options
context:
space:
mode:
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