Class: Pacer::Neo4j::Algo::PathFromPathPipe

Inherits:
PathPipe
  • Object
show all
Defined in:
lib/pacer-neo4j/algo/path_pipe.rb

Instance Attribute Summary collapse

Attributes inherited from PathPipe

#algo, #current_paths, #graph, #hits, #max_hits, #target

Instance Method Summary collapse

Methods inherited from PathPipe

#next_raw_path, #processNextStart, #unwrap

Constructor Details

#initialize(algo, graph, max_hits) ⇒ PathFromPathPipe

Returns a new instance of PathFromPathPipe.



67
68
69
# File 'lib/pacer-neo4j/algo/path_pipe.rb', line 67

def initialize(algo, graph, max_hits)
  super(algo, graph, nil, max_hits)
end

Instance Attribute Details

#target=(value) ⇒ Object (writeonly)

Sets the attribute target

Parameters:

  • value

    the value to set the attribute target to.



65
66
67
# File 'lib/pacer-neo4j/algo/path_pipe.rb', line 65

def target=(value)
  @target = value
end

Instance Method Details

#next_rawObject



71
72
73
74
75
# File 'lib/pacer-neo4j/algo/path_pipe.rb', line 71

def next_raw
  path = starts.next
  self.target = unwrap path.to_a.last
  unwrap path[0]
end