class Cranium::ProgressOutput

Public Class Methods

show_progress(title, total) { |progress_bar| ... } click to toggle source
# File lib/cranium/progress_output.rb, line 5
def self.show_progress(title, total)
  progress_bar = create_progress_bar title, total
  yield progress_bar
  progress_bar.finish
end

Private Class Methods

create_progress_bar(title, total) click to toggle source
# File lib/cranium/progress_output.rb, line 15
def self.create_progress_bar(title, total)
  if STDOUT.tty?
    ProgressBar.new(title, total, STDOUT)
  else
    NullProgressBar.new
  end
end