Skip to content
This repository
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor
2  lib/pacer/loader.rb
@@ -81,7 +81,7 @@ module SideEffect end
81 81 require 'pacer/transform/process'
82 82 require 'pacer/transform/join'
83 83 require 'pacer/transform/path'
84   -require 'pacer/transform/combined_path'
  84 +require 'pacer/transform/path_tree'
85 85 require 'pacer/transform/wrapped_path'
86 86 require 'pacer/transform/scatter'
87 87 require 'pacer/transform/has_count_cap'
28 lib/pacer/transform/combined_path.rb → lib/pacer/transform/path_tree.rb
@@ -2,25 +2,35 @@ module Pacer
2 2 module Core
3 3 module Graph
4 4 module PathRoute
5   - def combine(*exts)
6   - wrapped.chain_route transform: :combine_path, element_type: :object
  5 + # Transform raw paths to a tree:
  6 + # [a b c]
  7 + # [a b d]
  8 + # [a e f]
  9 + # [a e g]
  10 + # -- becomes --
  11 + # [a [b [c]
  12 + # [d]]
  13 + # [e [f
  14 + # g]]]
  15 + def tree
  16 + wrapped.chain_route transform: :path_tree, element_type: :object
7 17 end
8 18 end
9 19 end
10 20 end
11 21
12 22 module Transform
13   - module CombinePath
  23 + module PathTree
14 24 protected
15 25
16 26 def attach_pipe(end_pipe)
17   - pipe = CombinePathPipe.new
  27 + pipe = PathTreePipe.new
18 28 pipe.setStarts end_pipe
19 29 pipe
20 30 end
21 31
22 32
23   - class CombinePathPipe < Pacer::Pipes::RubyPipe
  33 + class PathTreePipe < Pacer::Pipes::RubyPipe
24 34 def initialize
25 35 super
26 36 self.building_path = nil
@@ -89,11 +99,3 @@ def next_path(path)
89 99 end
90 100 end
91 101
92   -
93   -# [a [b [c]
94   -# [d]]
95   -# [e [f
96   -# g]]]
97   -
98   -
99   -

No commit comments for this range

Something went wrong with that request. Please try again.