Class: Cosmos::Stderr
- Inherits:
-
IoMultiplexer
- Object
- IoMultiplexer
- Cosmos::Stderr
- Defined in:
- lib/cosmos/io/stderr.rb
Overview
Adds STDERR to the multiplexed streams
Constant Summary collapse
- @@instance =
nil
Class Method Summary collapse
-
.instance ⇒ Stderr
Returns a single instance of Stderr.
Instance Method Summary collapse
-
#initialize ⇒ Stderr
constructor
A new instance of Stderr.
- #tty? ⇒ Boolean
Methods inherited from IoMultiplexer
#add_stream, #method_missing, #remove_default_io, #remove_stream, #write
Constructor Details
#initialize ⇒ Stderr
Returns a new instance of Stderr.
27 28 29 30 31 |
# File 'lib/cosmos/io/stderr.rb', line 27 def initialize super() @streams << STDERR @@instance = self end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cosmos::IoMultiplexer
Class Method Details
.instance ⇒ Stderr
Returns a single instance of Stderr
34 35 36 37 |
# File 'lib/cosmos/io/stderr.rb', line 34 def self.instance self.new unless @@instance @@instance end |
Instance Method Details
#tty? ⇒ Boolean
39 40 41 |
# File 'lib/cosmos/io/stderr.rb', line 39 def tty? false end |