Sha256: 22677e4e5f7b8c35113b6726905b31071dbe68d1ad87dc1b0e202b5ab92b7cda
Contents?: true
Size: 518 Bytes
Versions: 4297
Compression:
Stored size: 518 Bytes
Contents
class ProgressBar module Components class Percentage attr_accessor :progress def initialize(options = {}) self.progress = options[:progress] end def percentage progress.percentage_completed.to_s end def justified_percentage progress.percentage_completed.to_s.rjust(3) end def percentage_with_precision progress.percentage_completed_with_precision end def justified_percentage_with_precision progress.percentage_completed_with_precision.to_s.rjust(6) end end end end
Version data entries
4,297 entries across 4,297 versions & 28 rubygems