Module: IO::generic_readable
- Defined in:
- ext/io/console/console.c
Instance Method Summary collapse
Instance Method Details
#getch(*args) ⇒ Object
2126 2127 2128 2129 2130 |
# File 'ext/io/console/console.c', line 2126
static VALUE
io_getch(int argc, VALUE *argv, VALUE io)
{
return rb_funcallv(io, id_getc, argc, argv);
}
|
#getpass(*args) ⇒ Object
2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 |
# File 'ext/io/console/console.c', line 2209
static VALUE
io_getpass(int argc, VALUE *argv, VALUE io)
{
VALUE str;
rb_check_arity(argc, 0, 1);
prompt(argc, argv, io);
rb_check_funcall(io, id_flush, 0, 0);
str = rb_ensure(gets_call, io, puts_call, io);
return str_chomp(str);
}
|