class Html::Proofer::MailtoAwesome::MailToAwesome
Public Instance Methods
awesome?()
click to toggle source
# File lib/mailto_awesome.rb, line 13 def awesome? @link.href.downcase.include? 'subject=' and @link.href.downcase.include? 'body=' end
mailto?()
click to toggle source
# File lib/mailto_awesome.rb, line 8 def mailto? return false if @link.ignore? || @link.href.nil? @link.href.match /^mailto:/i end
run()
click to toggle source
# File lib/mailto_awesome.rb, line 17 def run return unless @options[:check_mailto_awesome] @html.css('a').each do |node| @link = create_element(node) line = node.line content = node.to_s if mailto? && !awesome? add_issue("This is a not-awesome mailto link!", line: line, content: content) end end end