Class: Raf::NumList
Instance Method Summary collapse
Methods inherited from Element
#inline_parse_to_str, #newline_to_br
Instance Method Details
#apply ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/raf2html_element.rb', line 89 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 |