Class: Pipeable::Steps::Use
- Defined in:
- lib/pipeable/steps/use.rb
Overview
Messages a command (or pipe) which answers a result.
Instance Method Summary collapse
- #call(result) ⇒ Object
-
#initialize(command) ⇒ Use
constructor
A new instance of Use.
Methods included from Composable
Constructor Details
#initialize(command) ⇒ Use
Returns a new instance of Use.
7 8 9 10 |
# File 'lib/pipeable/steps/use.rb', line 7 def initialize(command, **) super(**) @command = command end |
Instance Method Details
#call(result) ⇒ Object
12 |
# File 'lib/pipeable/steps/use.rb', line 12 def call(result) = result.bind { |input| command.call input } |