Method: ProgressBar#set
- Defined in:
- lib/gonzui/progressbar.rb
#set(count) ⇒ Object
216 217 218 219 220 221 222 223 |
# File 'lib/gonzui/progressbar.rb', line 216 def set(count) if count < 0 || count > @total raise "invalid count: #{count} (total: #{@total})" end @current = count show_if_needed @previous = @current end |