Module: Core::Graph::VerticesRoute

Defined in:
lib/pacer-neo4j/algo.rb

Instance Method Summary collapse

Instance Method Details

#path_to(to_v, opts = {}) ⇒ Object



4
5
6
7
8
# File 'lib/pacer-neo4j/algo.rb', line 4

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

#paths_to(to_v, opts = {}) ⇒ Object



10
11
12
13
14
# File 'lib/pacer-neo4j/algo.rb', line 10

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