Class: Guides::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/guides/w3c_validator.rb

Instance Method Summary collapse

Instance Method Details

#validateObject



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/guides/w3c_validator.rb', line 35

def validate
  validator = MarkupValidator.new
  STDOUT.sync = true
  errors_on_guides = {}

  guides_to_validate.each do |f|
    results = validator.validate_file(f)

    if results.validity
      print "."
    else
      print "E"
      errors_on_guides[f] = results.errors
    end
  end

  show_results(errors_on_guides)
end