Method: IOHelper#without_cursor

Defined in:
lib/inquirer/utils/iohelper.rb

#without_cursorObject

hides the cursor and ensure the curso be visible at the end



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/inquirer/utils/iohelper.rb', line 107

def without_cursor
  # tell the terminal to hide the cursor
  print `tput civis`
  begin
    # run the block
    yield
  ensure
    # tell the terminal to show the cursor
    print `tput cnorm`
  end
end