Class: Bosh::Cli::InteractiveProgressRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/interactive_progress_renderer.rb

Instance Method Summary collapse

Constructor Details

#initializeInteractiveProgressRenderer


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, message)
  render(path, message.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