Class: Bosh::Cli::InteractiveProgressRenderer
- Defined in:
- lib/cli/interactive_progress_renderer.rb
Instance Method Summary collapse
- #error(path, message) ⇒ Object
- #finish(path, label) ⇒ Object
-
#initialize ⇒ InteractiveProgressRenderer
constructor
A new instance of InteractiveProgressRenderer.
- #progress(path, label, percent) ⇒ Object
- #start(path, label) ⇒ Object
Constructor Details
#initialize ⇒ InteractiveProgressRenderer
Returns a new instance of InteractiveProgressRenderer.
3 4 5 6 |
# File 'lib/cli/interactive_progress_renderer.rb', line 3 def initialize @mutex = Mutex.new @indices = {} end |
Instance Method Details
#error(path, message) ⇒ Object
16 17 18 |
# File 'lib/cli/interactive_progress_renderer.rb', line 16 def error(path, ) render(path, .make_red) end |
#finish(path, label) ⇒ Object
20 21 22 |
# File 'lib/cli/interactive_progress_renderer.rb', line 20 def finish(path, label) render(path, label.make_green) end |
#progress(path, label, percent) ⇒ Object
12 13 14 |
# File 'lib/cli/interactive_progress_renderer.rb', line 12 def progress(path, label, percent) render(path, "#{label} (#{percent}%)") end |
#start(path, label) ⇒ Object
8 9 10 |
# File 'lib/cli/interactive_progress_renderer.rb', line 8 def start(path, label) render(path, label) end |