Class: Pacer::Pipes::UnaryTransformPipe
- Defined in:
- lib/pacer/pipe/unary_transform_pipe.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#branch_a ⇒ Object
readonly
Returns the value of attribute branch_a.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Attributes inherited from RubyPipe
Instance Method Summary collapse
-
#initialize(method, branch_a) ⇒ UnaryTransformPipe
constructor
A new instance of UnaryTransformPipe.
- #processNextStart ⇒ Object
Methods inherited from RubyPipe
#enablePath, #reset, #setStarts
Constructor Details
#initialize(method, branch_a) ⇒ UnaryTransformPipe
Returns a new instance of UnaryTransformPipe.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/pacer/pipe/unary_transform_pipe.rb', line 8 def initialize(method, branch_a) super() if branch_a.is_a? Pipe @branch_a = branch_a @a = nil else @a = branch_a end @first = true @method = method @element = nil end |
Instance Attribute Details
#branch_a ⇒ Object (readonly)
Returns the value of attribute branch_a.
6 7 8 |
# File 'lib/pacer/pipe/unary_transform_pipe.rb', line 6 def branch_a @branch_a end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
6 7 8 |
# File 'lib/pacer/pipe/unary_transform_pipe.rb', line 6 def method @method end |
Instance Method Details
#processNextStart ⇒ Object
21 22 23 24 |
# File 'lib/pacer/pipe/unary_transform_pipe.rb', line 21 def processNextStart next_a a.send method rescue nil if a.respond_to? method end |