class PPZ::PModel
Constants
- UpperClass
Public Class Methods
new(text)
click to toggle source
# File lib/doc/model/p/index.rb, line 4 def initialize text # 转义行首的加号 pre = text[0..2] text = text[1..-1] if (pre == '\\+ ' or pre == '\\> ') # 转义 html text = transform_inline_element text @text = text end
Public Instance Methods
to_html()
click to toggle source
# File lib/doc/model/p/index.rb, line 14 def to_html "<p>#{@text}</p>" end