Class: Pipeable::Steps::Use

Inherits:
Abstract show all
Defined in:
lib/pipeable/steps/use.rb

Overview

Messages a command (or pipe) which answers a result.

Instance Method Summary collapse

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 }