class Bosh::Cli::NonInteractiveProgressRenderer

Public Class Methods

new() click to toggle source
# File lib/cli/non_interactive_progress_renderer.rb, line 3
def initialize
  @mutex = Mutex.new
end

Public Instance Methods

error(path, message) click to toggle source
# File lib/cli/non_interactive_progress_renderer.rb, line 14
def error(path, message)
  render(path, message)
end
finish(path, label) click to toggle source
# File lib/cli/non_interactive_progress_renderer.rb, line 18
def finish(path, label)
  render(path, label)
end
progress(path, label, percent) click to toggle source
# File lib/cli/non_interactive_progress_renderer.rb, line 11
def progress(path, label, percent)
end
start(path, label) click to toggle source
# File lib/cli/non_interactive_progress_renderer.rb, line 7
def start(path, label)
  render(path, label)
end

Private Instance Methods

render(path, label) click to toggle source
# File lib/cli/non_interactive_progress_renderer.rb, line 24
def render(path, label)
  @mutex.synchronize do
    truncated_path = path.truncate(40)
    say("#{truncated_path} #{label}")
    Bosh::Cli::Config.output.flush # Ruby 1.8 compatibility
  end
end