module Pacer module Core::Graph module VerticesRoute def path_to(to_v, opts = {}) route = self route = make_pairs(to_v) if to_v.is_a? Enumerable route.chain_route({transform: :path_finder, element_type: :path, max_hits: 1, target: to_v}.merge opts) end def paths_to(to_v, opts = {}) route = self route = make_pairs(to_v) if to_v.is_a? Enumerable route.chain_route({transform: :path_finder, element_type: :path, target: to_v}.merge opts) end end module PathRoute def expand(opts = {}) chain_route({transform: :path_finder, element_type: :path}.merge opts) end end end module Transform module PathFinder import org.neo4j.graphalgo.CommonEvaluators import org.neo4j.graphalgo.GraphAlgoFactory import org.neo4j.graphdb.Direction import org.neo4j.kernel.Traversal import org.neo4j.graphdb.DynamicRelationshipType include Pacer::Neo4j::Algo def after_initialize fail Pacer::ClientError, 'graph must be neo4j' unless graph.vendor == 'neo4j' end def help(opt = nil) case opt when nil puts <