Class: OpenC3::Stdout
- Inherits:
-
IoMultiplexer
- Object
- IoMultiplexer
- OpenC3::Stdout
- Defined in:
- lib/openc3/io/stdout.rb
Overview
Adds STDOUT to the multiplexed streams
Constant Summary collapse
- @@instance =
nil
Class Method Summary collapse
-
.instance ⇒ Stdout
Returns a single instance of Stdout.
Instance Method Summary collapse
-
#initialize ⇒ Stdout
constructor
A new instance of Stdout.
- #tty? ⇒ Boolean
Methods inherited from IoMultiplexer
#add_stream, #method_missing, #remove_default_io, #remove_stream, #respond_to_missing?, #write
Constructor Details
#initialize ⇒ Stdout
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
.instance ⇒ 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
42 43 44 |
# File 'lib/openc3/io/stdout.rb', line 42 def tty? false end |