Sha256: 3c560026e868d4f8814480e1b60d54ee5561a798f08c897b1bea3dc08fa5f7a7

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

#coding: utf-8

module Wombat
	module Property
	  module Locators
	    class Follow < Base
	    	def locate(context, page = nil)
	    		super do
            locate_nodes(context).flat_map do |node|
              target_page = page.click node
              context = target_page.parser

              Hash.new.tap do |h|
                @property.values
                  .select { |v| v.is_a?(Wombat::DSL::Property) || v.is_a?(Wombat::DSL::PropertyGroup) }
                  .map { |p| Factory.locator_for(p).locate(context, page) }
                  .map { |p| h.merge! p }
              end
            end
          end
	    	end
	    end
	  end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wombat-2.1.0 lib/wombat/property/locators/follow.rb
wombat-2.0.1 lib/wombat/property/locators/follow.rb
wombat-2.0.0 lib/wombat/property/locators/follow.rb