def replace_each(selector, collection, &block)
      selected_elements = select(selector)
      ExampleElementTransformer.new(self, selected_elements).replace_each(collection, &block)
    end
def replace_each(selector, collection, &block)
      selected_elements = select(selector)
      ExampleElementTransformer.new(self, selected_elements).replace_each(collection, &block)
    end
Replaces the selected elements with a clone for each item in the
 collection. If multiple elements are selected, only the first element
 will be used for cloning. All selected elements will be removed.

 @param [String] selector a CSS or XPath string describing the elements to
   transform
 @param [Enumerable] collection the items that are the base for each
   cloned element
 @example
   titles = %w(one two three)
   find('.post').replace_each(titles) do |title|
     text('h1', title)
   end