Module: Vt100::Cursor
- Defined in:
- lib/vt100/cursor.rb
Instance Method Summary collapse
- #cursor_backward(n) ⇒ Object
- #cursor_down(n) ⇒ Object
- #cursor_forward(n) ⇒ Object
- #cursor_hide ⇒ Object
- #cursor_home ⇒ Object
- #cursor_show ⇒ Object
- #cursor_up(n) ⇒ Object
Instance Method Details
#cursor_backward(n) ⇒ Object
17 18 19 |
# File 'lib/vt100/cursor.rb', line 17 def cursor_backward(n) print "\x1B[#{n}D" end |
#cursor_down(n) ⇒ Object
9 10 11 |
# File 'lib/vt100/cursor.rb', line 9 def cursor_down(n) print "\x1B[#{n}B" end |
#cursor_forward(n) ⇒ Object
13 14 15 |
# File 'lib/vt100/cursor.rb', line 13 def cursor_forward(n) print "\x1B[#{n}C" end |
#cursor_hide ⇒ Object
25 26 27 |
# File 'lib/vt100/cursor.rb', line 25 def cursor_hide print "\x1B[?25l" end |
#cursor_home ⇒ Object
21 22 23 |
# File 'lib/vt100/cursor.rb', line 21 def cursor_home print "\x1B[H" end |
#cursor_show ⇒ Object
29 30 31 |
# File 'lib/vt100/cursor.rb', line 29 def cursor_show print "\x1B[?25h" end |
#cursor_up(n) ⇒ Object
5 6 7 |
# File 'lib/vt100/cursor.rb', line 5 def cursor_up(n) print "\x1B[#{n}A" end |