diff options
author | Matheus Richard <[email protected]> | 2023-12-07 07:49:55 -0300 |
---|---|---|
committer | git <[email protected]> | 2023-12-07 10:50:00 +0000 |
commit | d69af4788a923f9afab63104a7adb72a02d37745 (patch) | |
tree | a7a2808182e73c112dc8987618cb3560e80b8285 /ext/io/console/console.c | |
parent | 2e9329e7a2967ee117ddf5a453b91439189bec65 (diff) |
[ruby/io-console] [DOC] Add documentation for IO#cursor
ruby/io-console#50
https://github.com/ruby/io-console/commit/ee752ce771
Diffstat (limited to 'ext/io/console/console.c')
-rw-r--r-- | ext/io/console/console.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c index 61b6e76327..78eb11a209 100644 --- a/ext/io/console/console.c +++ b/ext/io/console/console.c @@ -1152,6 +1152,16 @@ console_scroll(VALUE io, int line) # define console_key_pressed_p rb_f_notimplement #endif +/* + * call-seq: + * io.cursor -> [row, column] + * + * Returns the current cursor position as a two-element array of integers (row, column) + * + * io.cursor # => [3, 5] + * + * You must require 'io/console' to use this method. + */ static VALUE console_cursor_pos(VALUE io) { |