Class: Pacer::Core::Route::DetachedRoute
- Inherits:
-
Object
- Object
- Pacer::Core::Route::DetachedRoute
- Defined in:
- lib/pacer/core/route.rb
Instance Attribute Summary collapse
-
#preconfig ⇒ Object
readonly
Returns the value of attribute preconfig.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
Instance Method Summary collapse
- #build(graph, gather = true) ⇒ Object
-
#initialize(route) ⇒ DetachedRoute
constructor
A new instance of DetachedRoute.
Constructor Details
#initialize(route) ⇒ DetachedRoute
Returns a new instance of DetachedRoute.
643 644 645 646 647 648 649 |
# File 'lib/pacer/core/route.rb', line 643 def initialize(route) @route = route w = route.send(:configure_iterator) if w.respond_to? :instance @preconfig = w end end |
Instance Attribute Details
#preconfig ⇒ Object (readonly)
Returns the value of attribute preconfig.
641 642 643 |
# File 'lib/pacer/core/route.rb', line 641 def preconfig @preconfig end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
641 642 643 |
# File 'lib/pacer/core/route.rb', line 641 def route @route end |
Instance Method Details
#build(graph, gather = true) ⇒ Object
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/pacer/core/route.rb', line 651 def build(graph, gather = true) if route.is_a? Pacer::Filter::EmptyFilter pipe = Pacer::Pipes::IdentityPipe.new else pipe = Pacer::Route.pipeline route end = Pacer::Pipes::ExpandablePipe.new .enablePath true pipe.setStarts if preconfig pipe = preconfig.instance pipe, graph else pipe = route.send(:configure_iterator, pipe, graph) end pipe = yield pipe if block_given? if gather g = Pacer::Pipes::GatherPipe.new g.setStarts pipe DetachedPipe.new(, g, true) else DetachedPipe.new(, pipe, false) end end |