Class: Favicons
- Inherits:
-
HTML::Proofer::Checks::Check
- Object
- HTML::Proofer::Checks::Check
- Favicons
- Defined in:
- lib/html/proofer/checks/favicon.rb
Instance Attribute Summary
Attributes inherited from HTML::Proofer::Checks::Check
#additional_alt_ignores, #additional_href_ignores, #external_urls, #issues, #options, #path, #src
Instance Method Summary collapse
Methods inherited from HTML::Proofer::Checks::Check
#add_issue, #add_to_external_urls, #initialize, #output_filenames, subclasses
Constructor Details
This class inherits a constructor from HTML::Proofer::Checks::Check
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/html/proofer/checks/favicon.rb', line 11 def run return unless @options[:favicon] @html.xpath("//link[not(ancestor::pre or ancestor::code)]").each do |favicon| favicon = Favicon.new favicon, "favicon", self next if favicon.ignore? return if favicon.rel.split(" ").last.eql? "icon" end self.add_issue "no favicon specified" end |