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

Version Path
cybrid_api_id_ruby-0.123.111 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.110 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.110 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.110 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.109 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.109 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.109 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.107 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.107 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.107 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.106 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.106 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.106 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.105 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.105 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.105 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.104 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.104 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.104 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.103 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb