class ProgressBar::Components::Percentage
Attributes
Public Class Methods
Source
# File lib/ruby-progressbar/components/percentage.rb, line 6 def initialize(options = {}) self.progress = options[:progress] end
Public Instance Methods
Source
# File lib/ruby-progressbar/components/percentage.rb, line 14 def justified_percentage progress.percentage_completed.to_s.rjust(3) end
Source
# File lib/ruby-progressbar/components/percentage.rb, line 22 def justified_percentage_with_precision progress.percentage_completed_with_precision.to_s.rjust(6) end
Source
# File lib/ruby-progressbar/components/percentage.rb, line 10 def percentage progress.percentage_completed.to_s end
Source
# File lib/ruby-progressbar/components/percentage.rb, line 18 def percentage_with_precision progress.percentage_completed_with_precision end