Method: Cosmos::IoMultiplexer#method_missing
- Defined in:
- lib/cosmos/io/io_multiplexer.rb
#method_missing(method_name, *args) ⇒ Object
Forwards IO methods to all streams
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/cosmos/io/io_multiplexer.rb', line 45 def method_missing(method_name, *args) first = true result = nil @streams.each do |stream| if first # Fortify Access Specifier Manipulation # We're forwarding only public methods to the stream result = stream.public_send(method_name, *args) result = self if result == stream first = false else # Fortify Access Specifier Manipulation # We're forwarding only public methods to the stream stream.public_send(method_name, *args) end end result end |