Module: Sorbet::Private::Status
- Defined in:
- lib/status.rb
Overview
typed: true
Class Method Summary collapse
Class Method Details
.done ⇒ Object
15 16 17 18 19 20 |
# File 'lib/status.rb', line 15 def self.done if STDOUT.isatty # Clear the require_relative output when we're done requiring. print "\r\033[K" end end |
.say(message, print_without_tty: true) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/status.rb', line 5 def self.say(, print_without_tty: true) if STDOUT.isatty # Carriage return to reset cursor, ANSI escape code to clear current line. # (In case the new message is shorter than the old message.) print "\r\033[K#{}" elsif print_without_tty puts end end |