lib/rtf/node.rb
def to_rtf
         text      = StringIO.new
         separator = split? ? "\n" : " "
         line      = (separator == " ")

         text << "\\pard\\intbl"
         text << @style.prefix(nil, nil) if @style != nil
         text << separator
         self.each do |entry|
            text << "\n" if line
            line = true
            text << entry.to_rtf
         end
         text << (split? ? "\n" : " ")
         text << "\\cell"

         text.string
      end
def to_rtf
         text      = StringIO.new
         separator = split? ? "\n" : " "
         line      = (separator == " ")

         text << "\\pard\\intbl"
         text << @style.prefix(nil, nil) if @style != nil
         text << separator
         self.each do |entry|
            text << "\n" if line
            line = true
            text << entry.to_rtf
         end
         text << (split? ? "\n" : " ")
         text << "\\cell"

         text.string
      end
This method generates the RTF document text for a TableCellNode object.