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