# File lib/progress_bar/formatter.rb, line 6 def initialize(options) self.format_string = options[:format] || DEFAULT_FORMAT_STRING @title = options[:title] || DEFAULT_TITLE super(options) end
# File lib/progress_bar/formatter.rb, line 13 def format(new_format_string = DEFAULT_FORMAT_STRING) self.format_string = new_format_string @format.process(self) end
# File lib/progress_bar/formatter.rb, line 22 def progress @bar.progress end
# File lib/progress_bar/formatter.rb, line 18 def title=(title) @title = title end
# File lib/progress_bar/formatter.rb, line 26 def total @bar.total end