Module: Fir::ScreenHelper
Instance Method Summary collapse
- #clear(n) ⇒ Object
- #cursor_back(n) ⇒ Object
- #horizontal_absolute(n) ⇒ Object
- #line_prompt(prompt = '>') ⇒ Object
- #next_line(n) ⇒ Object
- #previous_line(n) ⇒ Object
Instance Method Details
#clear(n) ⇒ Object
18 19 20 |
# File 'lib/fir/screen_helper.rb', line 18 def clear(n) "\e[#{n}K" end |
#cursor_back(n) ⇒ Object
22 23 24 |
# File 'lib/fir/screen_helper.rb', line 22 def cursor_back(n) "\e[#{n}D" end |
#horizontal_absolute(n) ⇒ Object
14 15 16 |
# File 'lib/fir/screen_helper.rb', line 14 def horizontal_absolute(n) "\e[#{n}G" end |
#line_prompt(prompt = '>') ⇒ Object
26 27 28 |
# File 'lib/fir/screen_helper.rb', line 26 def line_prompt(prompt = '>') "(fir)#{prompt} " end |
#next_line(n) ⇒ Object
10 11 12 |
# File 'lib/fir/screen_helper.rb', line 10 def next_line(n) "\e[#{n}E" end |
#previous_line(n) ⇒ Object
6 7 8 |
# File 'lib/fir/screen_helper.rb', line 6 def previous_line(n) "\e[#{n}F" end |