Sha256: 46f927b8e2d0c23525a4a7c72595d039a3a1f50a454910af8b1db178c79bd358

Contents?: true

Size: 963 Bytes

Versions: 20

Compression:

Stored size: 963 Bytes

Contents

module Pacer
  module Pipes
    class PathWrappingPipe < RubyPipe
      attr_reader :graph
      attr_accessor :vertex_wrapper, :edge_wrapper, :other_wrapper

      def initialize(graph, vertex_extensions = [], edge_extensions = [])
        super()
        @graph = graph
        @vertex_wrapper = Pacer::Wrappers::WrapperSelector.build graph, :vertex, vertex_extensions || Set[]
        @edge_wrapper = Pacer::Wrappers::WrapperSelector.build graph, :edge, edge_extensions || Set[]
      end

      def getCurrentPath
        starts.getCurrentPath
      end

      def processNextStart
        path = starts.next
        path.collect do |item|
          if item.is_a? Pacer::Vertex
            vertex_wrapper.new graph, item
          elsif item.is_a? Pacer::Edge
            edge_wrapper.new graph, item
          elsif other_wrapper
            other_wrapper.new graph, item
          else
            item
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

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