Class: RDoc::Markup::ToHtml

Inherits:
Object
  • Object
show all
Defined in:
lib/yard_klippstein_template.rb

Instance Method Summary collapse

Instance Method Details

#list_end_for(list_type) ⇒ Object

Returns the HTML end-tag for list_type



30
31
32
33
34
35
36
37
38
39
# File 'lib/yard_klippstein_template.rb', line 30

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

#list_item_start(list_item, list_type) ⇒ Object

Returns the HTML tag for list_type, possible using a label from list_item



16
17
18
19
20
21
22
23
24
25
# File 'lib/yard_klippstein_template.rb', line 16

def list_item_start(list_item, list_type)
  case list_type
  when :BULLET, :LALPHA, :NUMBER, :UALPHA then
    "<li>"
  when :LABEL, :NOTE then
    "<div class=""rdoc-dl-row""> <dt>#{to_html list_item.label}\n<dd>"
  else
    raise RDoc::Error, "Invalid list type: #{list_type.inspect}"
  end
end