Class: Pacer::Pipes::WrappingPipe
- Defined in:
- lib/pacer/pipe/wrapping_pipe.rb
Instance Attribute Summary collapse
-
#element_type ⇒ Object
readonly
Returns the value of attribute element_type.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#wrapper ⇒ Object
Returns the value of attribute wrapper.
Attributes inherited from RubyPipe
Instance Method Summary collapse
- #getCurrentPath ⇒ Object
- #getSideEffect ⇒ Object
-
#initialize(graph, element_type = nil, extensions = []) ⇒ WrappingPipe
constructor
A new instance of WrappingPipe.
- #instance(pipe, g) ⇒ Object
- #processNextStart ⇒ Object
Methods inherited from RubyPipe
#enablePath, #reset, #setStarts
Constructor Details
#initialize(graph, element_type = nil, extensions = []) ⇒ WrappingPipe
Returns a new instance of WrappingPipe.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 6 def initialize(graph, element_type = nil, extensions = []) super() if graph.is_a? Array @graph, @wrapper = graph else @graph = graph @element_type = element_type @extensions = extensions || [] @wrapper = Pacer::Wrappers::WrapperSelector.build graph, element_type, @extensions end end |
Instance Attribute Details
#element_type ⇒ Object (readonly)
Returns the value of attribute element_type.
4 5 6 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 4 def element_type @element_type end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
4 5 6 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 4 def extensions @extensions end |
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
4 5 6 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 4 def graph @graph end |
#wrapper ⇒ Object
Returns the value of attribute wrapper.
4 5 6 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 4 def wrapper @wrapper end |
Instance Method Details
#getCurrentPath ⇒ Object
29 30 31 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 29 def getCurrentPath starts.getCurrentPath end |
#getSideEffect ⇒ Object
25 26 27 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 25 def getSideEffect starts.getSideEffect end |
#instance(pipe, g) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 18 def instance(pipe, g) g ||= graph p = WrappingPipe.new [g, wrapper] p.setStarts pipe p end |
#processNextStart ⇒ Object
41 42 43 |
# File 'lib/pacer/pipe/wrapping_pipe.rb', line 41 def processNextStart wrapper.new graph, starts.next end |