Sha256: 4adc87cf78d0fe5ab0d3c842bd234fe0db66a3b322751b9ffb64e464f0307cfc

Contents?: true

Size: 491 Bytes

Versions: 163

Compression:

Stored size: 491 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
    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

163 entries across 116 versions & 24 rubygems

Version Path
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
plaid-14.12.1 vendor/bundle/ruby/3.0.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
plaid-14.12.0 vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
plaid-14.11.1 vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
plaid-14.10.0 vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
plaid-14.7.0 vendor/bundle/ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
passbase-1.3.0 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
kinetic_sdk-5.0.19 gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb
kinetic_sdk-5.0.18 gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb
kinetic_sdk-5.0.17 gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb
kinetic_sdk-5.0.16 gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb
kinetic_sdk-5.0.15 gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb
kinetic_sdk-5.0.14 gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb
passbase-1.2.0 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
passbase-1.1.0 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
passbase-1.0.3 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
passbase-1.0.2 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
passbase-1.0.1 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
passbase-1.0.0 vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/ruby-progressbar-1.10.1/lib/ruby-progressbar/outputs/tty.rb