Method: ProgressBar#initialize
- Defined in:
-
lib/progressbar.rb,
lib/web/progressbar4web.rb
Returns a new instance of ProgressBar.
9 10 11 12 13 14 15 |
# File 'lib/progressbar.rb', line 9 def initialize(max, interval = 1, width = 50, char = "*") @max = max == 0 ? 1.0 : max.to_f @interval = interval @width = width @char = char @counter = 0 end |