Class: OpenC3::Stdout

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

Overview

Adds STDOUT 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

#initializeStdout

Returns a new instance of Stdout.



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

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

Dynamic Method Handling

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

Class Method Details

.instanceStdout

Returns a single instance of Stdout

Returns:

  • (Stdout)

    Returns a single instance of Stdout



37
38
39
40
# File 'lib/openc3/io/stdout.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/stdout.rb', line 42

def tty?
  false
end