Sha256: 08034a0fa55202557fd6d241257a0d20d0ddb492d53a79e61ff33db7e321aad3

Contents?: true

Size: 1.09 KB

Versions: 26

Compression:

Stored size: 1.09 KB

Contents

module Pacer::Pipes
  # Same concept as the regular pipeline, but this one
  # does not touch the intermediate pipes. They must be
  # wired together before being passed in to this object.
  # This allows me to build a pipeline in Pacer and then
  # pass it on to a pipe like FutureFilterPipe that only
  # knows how to act on a single pipe.
  class BlackboxPipeline
    include com.tinkerpop.pipes.Pipe

    attr_reader :pathEnabled

    def initialize(start_pipe, end_pipe)
      @start_pipe = start_pipe
      @end_pipe = end_pipe
    end

    def setStarts(pipe)
      if pipe.respond_to? :iterator
        @start_pipe.setStarts pipe.iterator
      else
        @start_pipe.setStarts pipe
      end
    end

    def next
      @end_pipe.next
    end

    def hasNext
      @end_pipe.hasNext
    end

    def reset
      @end_pipe.reset
    end

    def enablePath(b)
      @pathEnabled = b
      @end_pipe.enablePath b
    end

    def getCurrentPath
      @end_pipe.getCurrentPath
    end

    def iterator
      @end_pipe.iterator
    end

    def to_s
      "[#{ @start_pipe }...#{ @end_pipe }]"
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
pacer-2.0.10-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-2.0.10.pre-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-2.0.8-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-2.0.6-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-2.0.4.pre-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-2.0.0.pre-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.6.0-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.5.4-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.5.3-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.5.2-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.5.1-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.4.2-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.4.1-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.4.0-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.3.5-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.3.4-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.3.3-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.3.2-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.3.1-java lib/pacer/pipe/blackbox_pipeline.rb
pacer-1.2.0-java lib/pacer/pipe/blackbox_pipeline.rb