Module: Vt100::Cursor

Defined in:
lib/vt100/cursor.rb

Instance Method Summary collapse

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_hideObject



25
26
27
# File 'lib/vt100/cursor.rb', line 25

def cursor_hide
  print "\x1B[?25l"
end

#cursor_homeObject



21
22
23
# File 'lib/vt100/cursor.rb', line 21

def cursor_home
  print "\x1B[H"
end

#cursor_showObject



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