module Helper
Misc. helper methods which accomplish some common tasks.
Public Class Methods
highlight(text)
click to toggle source
# File lib/terminal-file-picker/helper.rb, line 19 def highlight(text) Pastel.new.decorate(text, :inverse) end
print_in_place(text)
click to toggle source
# File lib/terminal-file-picker/helper.rb, line 7 def print_in_place(text) line_count = text.count("\n") cursor = TTY::Cursor in_place = cursor.column(1) in_place << text in_place << cursor.up(line_count) in_place << cursor.column(1) print(in_place) end