method
display_list

v1_8_7_72 -
Show latest stable
-
0 notes -
Class: RI::HtmlFormatter
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
display_list(list)
public
Hide source
# File lib/rdoc/ri/ri_formatter.rb, line 514 def display_list(list) case list.type when SM::ListBase::BULLET list_type = "ul" prefixer = proc { |ignored| "<li>" } when SM::ListBase::NUMBER, SM::ListBase::UPPERALPHA, SM::ListBase::LOWERALPHA list_type = "ol" prefixer = proc { |ignored| "<li>" } when SM::ListBase::LABELED list_type = "dl" prefixer = proc do |li| "<dt><b>" + escape(li.label) + "</b><dd>" end when SM::ListBase::NOTE list_type = "table" prefixer = proc do |li| %{<tr valign="top"><td>#{li.label.gsub(/ /, ' ')}</td><td>} end else fail "unknown list type" end print "<#{list_type}>" list.contents.each do |item| if item.kind_of? SM::Flow::LI prefix = prefixer.call(item) print prefix display_flow_item(item, prefix) else display_flow_item(item) end end print "</#{list_type}>" end