Sha256: ea9345797ce86e3630c8ad823e6491eb3d8f3847cbc21374a3e6118cb516ccb9

Contents?: true

Size: 508 Bytes

Versions: 3

Compression:

Stored size: 508 Bytes

Contents

#coding: utf-8

module Wombat
  module Property
    module Locators
      class PropertyGroup < Base
        def locate(context, page = nil)
          super do
            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

Version data entries

3 entries across 3 versions & 1 rubygems

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