class InternalW3cValidatorWrapper
Public Class Methods
new(&block)
click to toggle source
# File lib/InternalW3cValidation.rb, line 12 def initialize(&block) @block = block; end
Public Instance Methods
run()
click to toggle source
# File lib/InternalW3cValidation.rb, line 16 def run() configuration = InternalW3cValidationConfiguration.new @block.call(configuration) errorReporter = ErrorReporterFactory.create(configuration) results = InternalW3cValidator.new.validate_pages(configuration.pages) results.each do | error | errorReporter.show(error) end errorReporter.end throw 'W3C Validation failed' if results.length > 0 && configuration.failOnError end