Sha256: 3d720a3c0e1fd8cb129d37942311e39b2bb8e160dbec14a64b425657e13c32da
Contents?: true
Size: 393 Bytes
Versions: 9
Compression:
Stored size: 393 Bytes
Contents
require 'set' module Stages class Unique < Stage def initialize(options = { }) @prefetch = options[:prefetch] super() end def process set = Set.new while !source_empty? i = input added = set.add? i handle_value i if added && !@prefetch end set.each{ |x| handle_value x} if @prefetch set = nil end end end
Version data entries
9 entries across 9 versions & 1 rubygems