class Mok::NumList

Public Instance Methods

apply() click to toggle source
# File lib/mok2html_element.rb, line 99
def apply
  str = "<ol>\n"
  @contents.map do |item|
    if item == :INDENT
      str += "<ol>\n"
    elsif item == :DEDENT
      str += "</ol>\n"
    else
      str += "<li>#{item.apply}</li>\n"
    end
  end
  str += "</ol>\n"
  str
end