Class: RDoc::Markup::ToHtml

Inherits:
Object
  • Object
show all
Defined in:
lib/hanna-nouveau.rb

Instance Method Summary collapse

Instance Method Details

#list_end_for(list_type) ⇒ Object



35
36
37
38
39
40
41
42
43
44
# File 'lib/hanna-nouveau.rb', line 35

def list_end_for(list_type)
  case list_type
  when :BULLET, :LALPHA, :NUMBER, :UALPHA then
    "</li>"
  when :LABEL, :NOTE then
    "</td></tr>"
  else
    raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
  end
end

#list_item_start(list_item, list_type) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/hanna-nouveau.rb', line 24

def list_item_start(list_item, list_type)
  case list_type
  when :BULLET, :LALPHA, :NUMBER, :UALPHA then
    "<li>"
  when :LABEL, :NOTE then
    "<tr><td class='label'>#{Array(list_item.label).map{|label| to_html(label)}.join("<br />")}</td><td>"
  else
    raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
  end
end