Class: Sprout::ProgressBar

Inherits:
Object
  • Object
show all
Defined in:
sprout/lib/sprout/progress_bar.rb

Direct Known Subclasses

ReversedProgressBar

Constant Summary

VERSION =
"0.9"
@@debug =
false
@@outio =
$stderr

Class Method Summary (collapse)

Class Method Details

+ (Object) debug=(debug)



29
30
31
32
33
34
35
36
# File 'sprout/lib/sprout/progress_bar.rb', line 29

def self.debug=(debug)
  @@debug = debug
  if(debug)
    @@outio = StringIO.new
  else
    @@outio = $stderr
  end
end

+ (Boolean) debug?

Returns:

  • (Boolean)


25
26
27
# File 'sprout/lib/sprout/progress_bar.rb', line 25

def self.debug?
  @@debug
end

+ (Object) new(title, total)



21
22
23
# File 'sprout/lib/sprout/progress_bar.rb', line 21

def self.new(title, total)
  return ProgressBarManager.instance.add(title, total)
end

+ (Object) outio



38
39
40
# File 'sprout/lib/sprout/progress_bar.rb', line 38

def self.outio
  @@outio
end