Module: RBText::Cursor
- Defined in:
- lib/rbtext/cursor.rb
Class Method Summary collapse
- .beginning_of_line ⇒ Object
- .down(num = 1) ⇒ Object
- .left(num = 1) ⇒ Object
- .right(num = 1) ⇒ Object
- .up(num = 1) ⇒ Object
Class Method Details
.beginning_of_line ⇒ Object
19 20 21 |
# File 'lib/rbtext/cursor.rb', line 19 def beginning_of_line print "\r" end |
.down(num = 1) ⇒ Object
7 8 9 |
# File 'lib/rbtext/cursor.rb', line 7 def down(num=1) print "\033[#{num.to_i}B" end |
.left(num = 1) ⇒ Object
11 12 13 |
# File 'lib/rbtext/cursor.rb', line 11 def left(num=1) print "\033[#{num.to_i}D" end |
.right(num = 1) ⇒ Object
15 16 17 |
# File 'lib/rbtext/cursor.rb', line 15 def right(num=1) print "\033[#{num.to_i}C" end |
.up(num = 1) ⇒ Object
3 4 5 |
# File 'lib/rbtext/cursor.rb', line 3 def up(num=1) print "\033[#{num.to_i}A" end |