Class: ParseErrorReport

Inherits:
GenericReport show all
Defined in:
lib/pqa.rb

Instance Method Summary collapse

Methods inherited from GenericReport

#colorize, #initialize, #pctg_of, #round

Constructor Details

This class inherits a constructor from GenericReport

Instance Method Details

#applicableObject



1090
1091
1092
# File 'lib/pqa.rb', line 1090

def applicable
  !@log.parse_errors.empty?
end

#htmlObject



1100
1101
1102
1103
1104
1105
1106
1107
# File 'lib/pqa.rb', line 1100

def html
  rpt = "<h3>#{title}</h3>\n"
  rpt << "<table><tr><th>Explanation</th><th>Offending line</th>\n"
  @log.parse_errors.each {|x|
      rpt << "<tr><td>#{x.exception.message}</td><td>#{x.line}</td></tr>\n" 
  }
  rpt << "</table>\n"
end

#textObject



1094
1095
1096
1097
1098
# File 'lib/pqa.rb', line 1094

def text
  rpt = "######## #{title}\n"
  @log.parse_errors.each {|x| rpt << "#{x.exception} : #{x.line}\n" }
  rpt
end

#titleObject



1086
1087
1088
# File 'lib/pqa.rb', line 1086

def title  
  "Parse Errors"
end