Sha256: ef2bf44e01a367bc167d49dd80ad427e61c749d1b2abac6e2bb59c06baf0f68c
Contents?: true
Size: 501 Bytes
Versions: 33
Compression:
Stored size: 501 Bytes
Contents
module Pacer::Pipes class BlockFilterPipe < AbstractPipe field_reader :starts attr_reader :block, :invert def initialize(back, block, invert = false) super() @invert = invert @block = Pacer::Wrappers::WrappingPipeFunction.new back, block end def processNextStart() while raw_element = starts.next ok = block.call raw_element ok = !ok if invert return raw_element if ok end raise EmptyPipe.instance end end end
Version data entries
33 entries across 33 versions & 1 rubygems