class Object
Public Instance Methods
validate(file, ext)
click to toggle source
Verify if `file` is valid
# File scripts/validate.rb, line 9 def validate(file, ext) puts "Validating #{file}..." if ext == '.html' results = W3CValidators::NuValidator.new.validate_file(file) elsif ext == '.css' results = W3CValidators::CSSValidator.new.validate_file(file) end return puts "#{file} is valid!" if results.errors.empty? results.errors.each { |err| puts err.to_s } end