Method: Puppet::CloudPack::ProgressBar#initialize

Defined in:
lib/puppet/cloudpack/progressbar.rb

#initialize(title, total, out = STDERR) ⇒ ProgressBar

Returns a new instance of ProgressBar.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/puppet/cloudpack/progressbar.rb', line 16

def initialize (title, total, out = STDERR)
  @title = title
  @total = total
  @out = out
  @terminal_width = 80
  @bar_mark = "o"
  @current = 0
  @previous = 0
  @finished_p = false
  @start_time = Time.now
  @previous_time = @start_time
  @title_width = 18
  @format = "%-#{@title_width}s %3d%% %s %s"
  @format_arguments = [:title, :percentage, :bar, :stat]
  clear
  show
end