Module: RichEngine::Terminal::Cursor Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal plumbing for controlling the terminal cursor: visibility and positioning.
Instance Method Summary collapse
-
#display ⇒ void
private
Shows the cursor.
-
#goto(x, y) ⇒ void
private
Moves the cursor to the given screen position.
-
#hide ⇒ void
private
Hides the cursor.
Instance Method Details
#display ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Shows the cursor.
22 23 24 |
# File 'lib/rich_engine/terminal/cursor.rb', line 22 def display system("tput cnorm") end |
#goto(x, y) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Moves the cursor to the given screen position.
31 32 33 |
# File 'lib/rich_engine/terminal/cursor.rb', line 31 def goto(x, y) $stdout.goto(x, y) end |
#hide ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Hides the cursor.
15 16 17 |
# File 'lib/rich_engine/terminal/cursor.rb', line 15 def hide system("tput civis") end |