Class: OpenC3::Stderr

Inherits:
IoMultiplexer show all
Defined in:
lib/openc3/io/stderr.rb

Overview

Adds STDERR to the multiplexed streams

Constant Summary collapse

@@instance =
nil

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from IoMultiplexer

#add_stream, #method_missing, #remove_default_io, #remove_stream, #respond_to_missing?, #write

Constructor Details

#initializeStderr

Returns a new instance of Stderr.



30
31
32
33
34
# File 'lib/openc3/io/stderr.rb', line 30

def initialize
  super()
  @streams << STDERR
  @@instance = self
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenC3::IoMultiplexer

Class Method Details

.instanceStderr

Returns a single instance of Stderr

Returns:

  • (Stderr)

    Returns a single instance of Stderr



37
38
39
40
# File 'lib/openc3/io/stderr.rb', line 37

def self.instance
  self.new unless @@instance
  @@instance
end

Instance Method Details

#tty?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/openc3/io/stderr.rb', line 42

def tty?
  false
end