Class: Mok::Table
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
Methods inherited from Element
Constructor Details
This class inherits a constructor from Mok::Element
Instance Method Details
#apply ⇒ Object
133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/mokelement.rb', line 133 def apply str = "" @contents.each do |line| line.each do |item| if item.split(//)[0] == "*" str += "|*#{item.sub(/^\*/, "").sub(/\*$/,"")}" else str += "|#{item}" end end str += "\n" end str end |