class ProgressBar::Outputs::NonTty
Constants
- DEFAULT_FORMAT_STRING
Attributes
Public Instance Methods
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 18 def bar_update_string formatted_string = bar.to_s formatted_string = formatted_string[0...-1] unless bar.finished? output_string = formatted_string[last_update_length..-1] self.last_update_length = formatted_string.length output_string.to_s end
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 8 def clear self.last_update_length = 0 stream.print "\n" end
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 28 def default_format DEFAULT_FORMAT_STRING end
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 38 def eol bar.stopped? ? "\n" : '' end
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 14 def last_update_length @last_update_length ||= 0 end
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 36 def refresh_with_format_change(*); end
Source
# File lib/ruby-progressbar/outputs/non_tty.rb, line 32 def resolve_format(*) default_format end