class Blinkr::Extensions::EmptyAHref
Public Class Methods
new(config)
click to toggle source
# File lib/blinkr/extensions/empty_a_href.rb, line 7 def initialize config @config = config end
Public Instance Methods
collect(page)
click to toggle source
# File lib/blinkr/extensions/empty_a_href.rb, line 11 def collect page page.body.css('a[href]').each do |a| if a['href'].empty? page.errors << Blinkr::Error.new({:severity => 'info', :category => 'HTML Compatibility/Correctness', :type => '<a href=""> empty', :title => %Q{<a href=""> empty (line #{a.line})}, :message => %Q{<a href=""> empty}, :snippet => a.to_s, :icon => 'fa-info'}) end end end