Sha256: aaf1e2806f6a871f5143f4a93325ac401ccd35dbde8c29901b25cecb88002b5a

Contents?: true

Size: 526 Bytes

Versions: 6866

Compression:

Stored size: 526 Bytes

Contents

require 'ruby-progressbar/output'

class   ProgressBar
module  Outputs
class   Tty < Output
  DEFAULT_FORMAT_STRING = '%t: |%B|'.freeze

  alias refresh_with_format_change with_refresh

  def clear
    stream.print clear_string
    stream.print "\r"
  end

  def bar_update_string
    bar.to_s
  end

  def default_format
    ENV['RUBY_PROGRESS_BAR_FORMAT'] || DEFAULT_FORMAT_STRING
  end

  def resolve_format(other_format)
    other_format || default_format
  end

  def eol
    bar.stopped? ? "\n" : "\r"
  end
end
end
end

Version data entries

6,866 entries across 6,861 versions & 41 rubygems

Version Path
cybrid_api_bank_ruby-0.123.132 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_id_ruby-0.123.132 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_organization_ruby-0.123.132 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_bank_ruby-0.123.131 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_id_ruby-0.123.131 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_organization_ruby-0.123.131 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_bank_ruby-0.123.129 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_id_ruby-0.123.129 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_organization_ruby-0.123.129 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_bank_ruby-0.123.127 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_id_ruby-0.123.127 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_organization_ruby-0.123.127 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_bank_ruby-0.123.126 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_id_ruby-0.123.126 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_organization_ruby-0.123.126 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
avalara_sdk-24.12.1 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.11.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_bank_ruby-0.123.125 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_organization_ruby-0.123.125 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_id_ruby-0.123.125 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb
cybrid_api_bank_ruby-0.123.124 vendor/bundle/ruby/3.3.0/gems/ruby-progressbar-1.13.0/lib/ruby-progressbar/outputs/tty.rb