class DocParser::HTMLOutput

The XLSXOutput class generates an HTML file containing a table @see Output

Constants

HTMLFOOTER
HTMLHEADER

@!visibility private

Public Instance Methods

header() click to toggle source
# File lib/docparser/output/html_output.rb, line 63
def header
  return if @header.nil? || @header.empty?

  @file << '<thead><tr>'
  @file << @header.map { |f| '<th>' + f + '</th>' }.join
  @file << "</tr></thead>\n<tbody>\n"
  @tbody = true
end
open_file() click to toggle source
# File lib/docparser/output/html_output.rb, line 59
def open_file
  @file << HTMLHEADER.gsub('#FILENAME#', @filename)
end
write_row(row) click to toggle source
# File lib/docparser/output/html_output.rb, line 72
def write_row(row)
  unless @tbody
    @file << "<tbody>\n"
    @tbody = true
  end
  @file << '<tr>'
  @file << row.map { |f| '<td>' + CGI.escapeHTML(f.to_s) + '</td>' }.join
  @file << "</tr>\n"
end