Class: HTMLValidationReview
- Inherits:
-
Thor
- Object
- Thor
- HTMLValidationReview
- Includes:
- PageValidations
- Defined in:
- bin/html_validation
Constant Summary
Constants included from PageValidations
PageValidations::HTML_VALIDATOR_VERSION
Instance Method Summary collapse
Methods included from PageValidations
data_path, data_path=, #have_valid_html, included
Instance Method Details
#review ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'bin/html_validation', line 13 def review data_path = [:data_path] || File.join(Dir.getwd, '.validation') $stdout.puts "Reviewing validation results in: #{data_path}" HTMLValidation.new(data_path).each_exception do |result| $stdout.puts "Validation exceptions for: #{result.resource}:\n#{result.exceptions}" $stdout.puts "Accept (y)es (n)o or (q)uit" sin = $stdin.gets if sin[0].downcase == 'y' result.accept! $stdout.puts "Accepted!" else result.reject! $stdout.puts "Rejected!" end exit if sin.downcase == 'exit' or sin.downcase == 'quit' or sin.downcase == 'q' end $stdout.puts "HTML Validation Acceptance completed" end |