Module: IO::generic_readable (Ruby 2.3.7)
Description: Module : IO::generic_readable - Ruby 2.3.7

- Home
- Core 2.3.7
- Std-lib 2.3.7
- Downloads

Support for the Ruby 2.3 series has ended. See here for reference.

### Home Classes Methods

### In Files

- io/console/console.c

### Methods

- #getch
- #getpass

### Class/Module Index

Quicksearch

- IO
- IO::generic_readable

No matching classes.

# IO::generic_readable

### Public Instance Methods

getch(min: nil, time: nil) → char click to toggle source

See IO#getch.

                   static VALUE
    io_getch(int argc, VALUE *argv, VALUE io)
    {
        return rb_funcall2(io, id_getc, argc, argv);
    }

getpass(prompt=nil) → string click to toggle source

See IO#getpass.

                   static VALUE
    io_getpass(int argc, VALUE *argv, VALUE io)
    {
        VALUE str;

        rb_check_arity(argc, 0, 1);
        prompt(argc, argv, io);
        str = str_chomp(rb_funcallv(io, id_gets, 0, 0));
        puts_call(io);
        return str;
    }