lib/kitchen/element_enumerator_base.rb
# Searches for elements handled by a list of enumerator classes.  All element that
# matches one of those enumerator classes are iterated over.
#
# @param enumerator_classes [Array<ElementEnumeratorBase>]
# @return [TypeCastingElementEnumerator]
#
Searches for elements handled by a list of enumerator classes.  All element that
matches one of those enumerator classes are iterated over.
Searches for elements handled by a list of enumerator classes . All element that matches one of those enumerator classes are iterated over .
def search_with(*enumerator_classes)
      block_error_if(block_given?)
      raise 'must supply at least one enumerator class' if enumerator_classes.empty?
      factory = enumerator_classes[0].factory
      enumerator_classes[1..-1].each do |enumerator_class|
        factory = factory.or_with(enumerator_class.factory)
      end
      factory.build_within(self)
    end
def search_with ( * enumerator_classes ) block_error_if ( block_given? ) raise 'must supply at least one enumerator class' if enumerator_classes . empty? factory = enumerator_classes [ 0 ] . factory enumerator_classes [ 1 .. - 1 ] . each do | enumerator_class | factory = factory . or_with ( enumerator_class . factory ) end factory . build_within ( self ) end
Searches for elements handled by a list of enumerator classes.
Searches for elements handled by a list of enumerator classes .
None
TypeCastingElementEnumerator
enumerator_classes
<not_specific>
<not_specific>
None