Sha256: 22677e4e5f7b8c35113b6726905b31071dbe68d1ad87dc1b0e202b5ab92b7cda
Contents?: true
Size: 518 Bytes
Versions: 4342
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,342 entries across 4,342 versions & 29 rubygems
Version | Path |
---|---|
ruby-progressbar-1.13.0rc1 | lib/ruby-progressbar/components/percentage.rb |
ruby-progressbar-1.12.0 | lib/ruby-progressbar/components/percentage.rb |