Class: RDoc::Markup::ToHtml

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

My Project Header

Instance Method Summary (collapse)

Instance Method Details

- (Object) list_end_for(list_type)

Returns the HTML end-tag for list_type



34
35
36
37
38
39
40
41
42
43
# File 'lib/yard_klippstein_template.rb', line 34

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

- (Object) list_item_start(list_item, list_type)

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



20
21
22
23
24
25
26
27
28
29
# File 'lib/yard_klippstein_template.rb', line 20

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