instance method
IO#cursor=
([ ::Integer, ::Integer ]) -> [ ::Integer, ::Integer ]
io.cursor = [line, column] → io
ext/io/console/console.c
View on GitHub ↗
static VALUE
console_cursor_set(VALUE io, VALUE cpos)
{
cpos = rb_convert_type(cpos, T_ARRAY, "Array", "to_ary");
if (RARRAY_LEN(cpos) != 2) rb_raise(rb_eArgError, "expected 2D coordinate");
return console_goto(io, RARRAY_AREF(cpos, 0), RARRAY_AREF(cpos, 1));
}