Class: InternalW3cValidatorWrapper
- Inherits:
-
Object
- Object
- InternalW3cValidatorWrapper
- Defined in:
- lib/InternalW3cValidation.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ InternalW3cValidatorWrapper
constructor
A new instance of InternalW3cValidatorWrapper.
- #run ⇒ Object
Constructor Details
#initialize(&block) ⇒ InternalW3cValidatorWrapper
Returns a new instance of InternalW3cValidatorWrapper.
11 12 13 |
# File 'lib/InternalW3cValidation.rb', line 11 def initialize(&block) @block = block; end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/InternalW3cValidation.rb', line 15 def run() configuration = InternalW3cValidationConfiguration.new @block.call(configuration) results = InternalW3cValidator.new.validate_pages(configuration.pages) results.each do | error | puts error.to_s end throw "There are #{results.length} W3c Validation Errors" if results.length > 0 && configuration.failOnError end |