Class: Sink::InputSelectWrapper

Inherits:
InputWrapper show all
Defined in:
lib/coroutines/sink.rb

Instance Method Summary collapse

Methods inherited from InputWrapper

#close, #initialize

Methods included from Sink

#<=, #close, #input_map, #input_reduce, #input_reject, #input_select

Constructor Details

This class inherits a constructor from Sink::InputWrapper

Instance Method Details

#<<(args) ⇒ Object



113
114
115
# File 'lib/coroutines/sink.rb', line 113

def <<(args)
  @target << args if @block.call(args)
end

#inspectObject



116
117
118
# File 'lib/coroutines/sink.rb', line 116

def inspect
  "#<#{@target.inspect}#select>"
end