Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
IO#console_mode
() -> ::IO::ConsoleMode
io.console_mode → mode
ext/io/console/console.c
View on GitHub ↗
static VALUE
console_conmode_get(VALUE io)
{
conmode t;
int fd = GetReadFD(io);
if (!getattr(fd, &t)) sys_fail(io);
return conmode_new(cConmode, &t);
}
Returns a data represents the current console mode.
You must require ‘io/console’ to use this method.
See also
#console_mode=
#console_input_events
#close_write
#cooked
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0