Module: Console::Output::Default
- Defined in:
- lib/console/output/default.rb
Overview
Default output format selection.
Class Method Summary collapse
-
.new(stream, **options) ⇒ Object
Create a new output format based on the given stream.
Class Method Details
.new(stream, **options) ⇒ Object
Create a new output format based on the given stream.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/console/output/default.rb', line 19 def self.new(stream, **) stream ||= $stderr if stream.tty? output = Terminal.new(stream, **) else output = Serialized.new(stream, **) end return output end |