class Mdextab::Tr

TRトークン対応クラス

Public Class Methods

new(lineno) click to toggle source

初期化

@param lineno [String] TRトークン出現行の行番号

# File lib/mdextab/tr.rb, line 9
def initialize(lineno)
  @lineno = lineno
  @array = []
end

Public Instance Methods

add(cont) click to toggle source

TRトークンのコンテンツ追加

@param content [String] TRトークンのコンテンツ @return [void]

# File lib/mdextab/tr.rb, line 19
def add(cont)
  @array << cont
end
to_s() click to toggle source

trの文字列化

@return [String] HTMLのTRタグとして文字列化したもの

# File lib/mdextab/tr.rb, line 27
def to_s
  ["<tr>", @array.map(&:to_s), "</tr>"].join("\n")
end