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_bank_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.149 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.148 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.147 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
ory-client-1.16.2 vendor/bundle/ruby/3.1.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.145 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_id_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.144 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
ory-client-1.16.1 vendor/bundle/ruby/3.1.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
ory-client-1.16.0 vendor/bundle/ruby/3.1.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_bank_ruby-0.123.143 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb
cybrid_api_organization_ruby-0.123.143 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/components/percentage.rb