Cursor module provides escape sequence strings for cursor control.
Unlike Terminal module methods which print directly, these return strings
that can be used in string building/concatenation.
Example:
io << Cursor.move_to(1, 1) << "Hello" << Cursor.move_to(2, 1) << "World"
Class methods
clear
Clear screen and move to home (convenience)
Sourceenter_alt_screen
Enter alternate screen buffer
Sourceerase_line_left
Erase from start of line to cursor
Sourceerase_line_right
Erase from cursor to end of line
Sourceerase_screen_above
Erase from start of screen to cursor
Sourceerase_screen_below
Erase from cursor to end of screen
Sourceexit_alt_screen
Exit alternate screen buffer
Sourcehome
Move cursor to home position (top-left)
SourceMove cursor left n columns
SourceMove cursor to specific position (row, col are 1-based)
SourceMove cursor to beginning of line n lines down
SourceMove cursor to beginning of line n lines up
Sourcerequest_position
Request cursor position (terminal will respond with position)
SourceMove cursor right n columns
Source