def for_consecutive_items(items, satisfies, min_consecutive = 2)
      current_index = -1

      while (current_index += 1) < items.count
        next unless satisfies[items[current_index]]

        count = count_consecutive(items, current_index, &satisfies)
        next unless count >= min_consecutive

        # Yield the chunk of consecutive items
        yield items[current_index...(current_index + count)]

        current_index += count # Skip this patch of consecutive items to find more
      end
    end
def for_consecutive_items(items, satisfies, min_consecutive = 2)
      current_index = -1

      while (current_index += 1) < items.count
        next unless satisfies[items[current_index]]

        count = count_consecutive(items, current_index, &satisfies)
        next unless count >= min_consecutive

        # Yield the chunk of consecutive items
        yield items[current_index...(current_index + count)]

        current_index += count # Skip this patch of consecutive items to find more
      end
    end
Find all consecutive items satisfying the given block of a minimum size,
 yielding each group of consecutive items to the provided block.

 @param items [Array]
 @param satisfies [Proc] function that takes an item and returns true/false
 @param min_consecutive [Fixnum] minimum number of consecutive items before
   yielding the group
 @yield Passes list of consecutive items all matching the criteria defined
   by the `satisfies` {Proc} to the provided block
 @yieldparam group [Array] List of consecutive items
 @yieldreturn [Boolean] block should return whether item matches criteria
   for inclusion