Class: Pyper::Pipes::Tap

Inherits:
Object
  • Object
show all
Defined in:
lib/pyper/pipes/tap.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Tap

Returns a new instance of Tap.



3
4
5
# File 'lib/pyper/pipes/tap.rb', line 3

def initialize(&block)
  @block = block
end

Instance Method Details

#call(arg, _status) ⇒ Object



7
8
9
# File 'lib/pyper/pipes/tap.rb', line 7

def call(arg, _status)
  arg.tap(&@block)
end