Files

ProgressBar::Formatter

Public Class Methods

new(options) click to toggle source
# File lib/ruby-progressbar/formatter.rb, line 7
def initialize(options)
  self.format_string = options[:format] || DEFAULT_FORMAT_STRING
  @title             = options[:title]  || DEFAULT_TITLE

  super(options)
end

Public Instance Methods

format(new_format_string = DEFAULT_FORMAT_STRING) click to toggle source
# File lib/ruby-progressbar/formatter.rb, line 14
def format(new_format_string = DEFAULT_FORMAT_STRING)
  self.format_string = new_format_string
  @format.process(self)
end
progress() click to toggle source
# File lib/ruby-progressbar/formatter.rb, line 23
def progress
  @bar.progress
end
title=(title) click to toggle source
# File lib/ruby-progressbar/formatter.rb, line 19
def title=(title)
  @title = title
end
total() click to toggle source
# File lib/ruby-progressbar/formatter.rb, line 27
def total
  @bar.total
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.