Sha256: 821ace69683935b7b42eb2724f9dd5a34d9e34ddea0645b5b7ce72b323d4658e
Contents?: true
Size: 530 Bytes
Versions: 37
Compression:
Stored size: 530 Bytes
Contents
module Pacer::Pipes class EnumerablePipe < RubyPipe def initialize(enumerable) super() case enumerable when Enumerator starts = enumerable when Pacer::Wrappers::ElementWrapper starts = [enumerable.element].to_enum when Enumerable starts = enumerable.to_enum else starts = [enumerable].to_enum end set_starts starts end def processNextStart() @starts.next rescue StopIteration raise EmptyPipe.instance end end end
Version data entries
37 entries across 37 versions & 1 rubygems