class HighLine::Terminal::IOConsole

We should make a more robust implementation.
TODO: We’re rescuing when not a terminal.
It’s the most used terminal.
io/console option for HighLine::Terminal.

def get_character

(see Terminal#get_character)
def get_character
  input.getch(intr: true) # from ruby io/console
rescue Errno::ENOTTY
  input.getc
end

def raw_no_echo_mode

(see Terminal#raw_no_echo_mode)
def raw_no_echo_mode
  input.echo = false
rescue Errno::ENOTTY
end

def restore_mode

(see Terminal#restore_mode)
def restore_mode
  input.echo = true
rescue Errno::ENOTTY
end

def terminal_size

(see Terminal#terminal_size)
def terminal_size
  output.winsize.reverse
rescue Errno::ENOTTY
end