Skip to content

Commit

Permalink
[DOC] Add documentation for IO#cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheusRich authored Dec 7, 2023
1 parent aa9e791 commit ee752ce
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ext/io/console/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ee752ce

Please sign in to comment.