Class: Pipetree::Flow::And
- Inherits:
-
Object
- Object
- Pipetree::Flow::And
- Defined in:
- lib/pipetree/flow.rb
Overview
Call step proc and return (Right || Left).
Direct Known Subclasses
Instance Method Summary collapse
- #call(last, input, options) ⇒ Object
-
#initialize(proc) ⇒ And
constructor
A new instance of And.
Constructor Details
#initialize(proc) ⇒ And
Returns a new instance of And.
92 93 94 |
# File 'lib/pipetree/flow.rb', line 92 def initialize(proc) @proc = proc end |
Instance Method Details
#call(last, input, options) ⇒ Object
96 97 98 |
# File 'lib/pipetree/flow.rb', line 96 def call(last, input, ) @proc.(input, ) ? [Right, input] : [Left, input] end |