Top Level Namespace

Defined Under Namespace

Modules: IMP3 Classes: String

Instance Method Summary collapse

Instance Method Details

#progress_bar(arr, options = {:format => ":percent_complete% |:progress_bar| :title"}, &block) ⇒ Object



97
98
99
100
101
# File 'lib/imp3/cli.rb', line 97

def progress_bar arr, options = {:format => ":percent_complete% |:progress_bar| :title"}, &block
  bar = ProgressBar.new arr.size, options
  bar.show
  arr.each { |v| yield(v, bar) }
end