def count_consecutive(items, offset = 0)
      count = 1
      count += 1 while (offset + count < items.count) && yield(items[offset + count])
      count
    end
def count_consecutive(items, offset = 0)
      count = 1
      count += 1 while (offset + count < items.count) && yield(items[offset + count])
      count
    end
Count the number of consecutive items satisfying the given {Proc}.

 @param items [Array]
 @param offset [Fixnum] index to start searching from
 @yield [item] Passes item to the provided block.
 @yieldparam item [Object] Item to evaluate as matching criteria for
   inclusion
 @yieldreturn [Boolean] whether to include the item
 @return [Integer]