class HighLine::Terminal::IOConsole
io/console option for HighLine::Terminal. It's the most used terminal. TODO: We're rescuing when not a terminal.
We should make a more robust implementation.
Public Instance Methods
get_character()
click to toggle source
(see HighLine::Terminal#get_character)
# File lib/highline/terminal/io_console.rb, line 28 def get_character input.getch(intr: true) # from ruby io/console rescue Errno::ENOTTY input.getc end
raw_no_echo_mode()
click to toggle source
(see HighLine::Terminal#raw_no_echo_mode)
# File lib/highline/terminal/io_console.rb, line 16 def raw_no_echo_mode input.echo = false rescue Errno::ENOTTY end
restore_mode()
click to toggle source
(see HighLine::Terminal#restore_mode)
# File lib/highline/terminal/io_console.rb, line 22 def restore_mode input.echo = true rescue Errno::ENOTTY end
terminal_size()
click to toggle source
(see HighLine::Terminal#terminal_size)
# File lib/highline/terminal/io_console.rb, line 10 def terminal_size output.winsize.reverse rescue Errno::ENOTTY end