Sha256: ae844e28abafb33b6e5bdbcdf34987423cf020d28b2c8df3d107c0b7fe12715f
Contents?: true
Size: 494 Bytes
Versions: 3
Compression:
Stored size: 494 Bytes
Contents
require 'ruby-progressbar/output' class ProgressBar module Outputs class Tty < Output DEFAULT_FORMAT_STRING = '%t: |%B|' alias_method :refresh_with_format_change, :with_refresh def clear stream.print clear_string stream.print "\r" end def bar_update_string bar.to_s end def default_format DEFAULT_FORMAT_STRING end def resolve_format(other_format) other_format || default_format end def eol bar.stopped? ? "\n" : "\r" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-progressbar-1.7.5 | lib/ruby-progressbar/outputs/tty.rb |
ruby-progressbar-1.7.1 | lib/ruby-progressbar/outputs/tty.rb |
ruby-progressbar-1.7.0 | lib/ruby-progressbar/outputs/tty.rb |