Method: OpenC3::IoMultiplexer#method_missing

Defined in:
lib/openc3/io/io_multiplexer.rb

#method_missing(method_name, *args) ⇒ Object

Forwards IO methods to all streams



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/openc3/io/io_multiplexer.rb', line 48

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