Method: CLI::UI::Progress.progress
- Defined in:
- lib/cli/ui/progress.rb
.progress(title = nil, width: Terminal.width, &block) ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/cli/ui/progress.rb', line 54 def progress(title = nil, width: Terminal.width, &block) = Progress.new(title, width: width) print(CLI::UI::ANSI.hide_cursor) yield() ensure puts() CLI::UI.raw do print(ANSI.show_cursor) end end |