APIdock / Ruby
/
Browse About
method

echo?

v2_2_9 - Show latest stable - Class: IO
echo?()
public

Returns true if echo back is enabled.

You must require ‘io/console’ to use this method.

static VALUE
console_echo_p(VALUE io)
{
    conmode t;
    rb_io_t *fptr;
    int fd;

    GetOpenFile(io, fptr);
    fd = GetReadFD(fptr);
    if (!getattr(fd, &t)) rb_sys_fail(0);
    return echo_p(&t) ? Qtrue : Qfalse;
}

Related methods

  • Instance methods
  • <<
  • advise
  • autoclose=
  • autoclose?
  • binmode
  • binmode?
  • bytes
  • chars
  • close
  • close_on_exec=
  • close_on_exec?
  • close_read
  • close_write
  • closed?
  • codepoints
  • cooked
  • cooked!
  • each
  • each_byte
  • each_char
  • each_codepoint
  • each_line
  • echo=
  • echo?
  • eof
  • eof?
  • expect
  • external_encoding
  • fcntl
  • fdatasync
  • fileno
  • flush
  • fsync
  • getbyte
  • getc
  • getch
  • gets
  • iflush
  • initialize_copy
  • inspect
  • internal_encoding
  • ioctl
  • ioflush
  • isatty
  • lineno
  • lineno=
  • lines
  • noecho
  • nonblock
  • nonblock=
  • nonblock?
  • nread
  • oflush
  • pathconf
  • pid
  • pos
  • pos=
  • print
  • printf
  • putc
  • puts
  • raw
  • raw!
  • read
  • read_nonblock
  • readbyte
  • readchar
  • readline
  • readlines
  • readpartial
  • ready?
  • reopen
  • rewind
  • scanf
  • seek
  • set_encoding
  • stat
  • sync
  • sync=
  • sysread
  • sysseek
  • syswrite
  • tell
  • to_i
  • to_io
  • tty?
  • ungetbyte
  • ungetc
  • wait
  • wait_readable
  • wait_writable
  • winsize
  • winsize=
  • write
  • write_nonblock
  • Class methods
  • binread
  • binwrite
  • console
  • copy_stream
  • for_fd
  • foreach
  • new
  • open
  • pipe
  • popen
  • read
  • readlines
  • select
  • sysopen
  • try_convert
  • write
  • Private methods
  • privateblock_scanf
  • privatesoak_up_spaces
APIdock API Documentation Browser

© 2026 APIdock