Class: Canvas::ValidHtmlCheck
- Defined in:
- lib/canvas/checks/valid_html_check.rb
Overview
:documented:
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from Check
Constructor Details
This class inherits a constructor from Canvas::Check
Instance Method Details
#html_files ⇒ Object
21 22 23 |
# File 'lib/canvas/checks/valid_html_check.rb', line 21 def html_files Dir.glob("**/*.{html,liquid}") end |
#run ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/canvas/checks/valid_html_check.rb', line 6 def run html_files.each do |filename| file = File.read(filename) validator = Validator::Html.new(file) next if validator.validate validator.errors.map(&:message).each do || @offenses << Offense.new( message: "Invalid HTML: #{filename} - \n#{}" ) end end end |