class HtmlErrorReporter

Public Class Methods

new(output_file_name) click to toggle source
# File lib/InternalW3cValidation.rb, line 47
def initialize(output_file_name)
        @error_count = 0
        @output_file_name = output_file_name
        dirname = File.dirname(output_file_name)
        puts dirname
        FileUtils.mkdir_p(dirname)
        @report_html_file = ReportHtmlFile.new(output_file_name)
end

Public Instance Methods

end() click to toggle source
# File lib/InternalW3cValidation.rb, line 61
def end
        @report_html_file.save
        puts "--------------------------------------------------------------------------------------"
        puts "There are #{@error_count} W3c Validation Errors (see #{@output_file_name} for details)"
        puts "--------------------------------------------------------------------------------------"
end
show(error) click to toggle source
# File lib/InternalW3cValidation.rb, line 56
def show(error)
        @error_count += 1
        @report_html_file.add_error(error)
end