# File lib/phusion_passenger/utils/progress_bar.rb, line 50 def finish @output.write("\n") @output.flush end
# File lib/phusion_passenger/utils/progress_bar.rb, line 35 def set(percentage) if @tty width = (percentage * 50).to_i bar = "*" * width space = " " * (50 - width) text = sprintf("[%s%s] %s", bar, space, THROBBLER[@throbbler_index]) @throbbler_index = (@throbbler_index + 1) % THROBBLER.size @output.write("#{text}\r") @output.flush else @output.write(".") @output.flush end end
Generated with the Darkfish Rdoc Generator 2.