=begin Copyright 2010-2014 Tasos Laskos This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end # # Extracts paths from anchor elements. # # @author Tasos "Zapotek" Laskos # # @version 0.1.1 # class Arachni::Parser::Extractors::Anchors < Arachni::Parser::Extractors::Base # # Returns an array of paths as plain strings # # @param [Nokogiri] doc Nokogiri document # # @return [Array] paths # def run( doc ) doc.search( '//a[@href]' ).map { |a| a['href'] } end end