Sha256: 3f41492033aeeb868214b7fdbc7efaed95fe525564ded27adc3c712a6a6f2c80

Contents?: true

Size: 628 Bytes

Versions: 3

Compression:

Stored size: 628 Bytes

Contents

#coding: utf-8
require 'wombat/property/locators/property_group'

module Wombat
  module Property
    module Locators
      class Iterator < Base
      	def locate(contex, page = nil)
          super do
            locate_nodes(contex).flat_map do |node|
              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(node, 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/iterator.rb
wombat-2.0.1 lib/wombat/property/locators/iterator.rb
wombat-2.0.0 lib/wombat/property/locators/iterator.rb