class

Term::Progress::Bar

Inherits Reference < Object

Constants

DEFAULT_FORMAT = "[:bar] :percent :current/:total"
DEFAULT_WIDTH = 30

Constructors

new(total : Int64 = 100, **options)
Source

Instance methods

advance(by : Int64 = 1)
Source
attach_to(multi : Multi, row : Int32)
Source
complete_char
Source
current
Source
detach

Detach this bar from its Multi orchestrator

Source
disable_spinner

Disable spinner animation and clear token

Source
enable_spinner(format : String | Symbol = :classic, frames : Array(String) | Nil = nil, interval : Int32 | Time::Span | Nil = nil)

Enable animated spinner token inside this bar.

  • Include :spinner in the bar format string to display.
  • Frames are sourced from Term::Spinner::FORMATS by name (default: :classic).
  • You can also provide custom frames: and/or interval:.

Examples: bar = Term::Progress::Bar.new(format: ":spinner [:bar] :percent") bar.enable_spinner(:dots)

bar.enable_spinner(frames: ["-", "\", "|", "/"], interval: 100.milliseconds)

Source
finish(message = "")
Source
finished?
Source
format
Source
head_char
Source
incomplete_char
Source
log(message : String)
Source
meter
Source
output
Source
ratio
Source
reset
Source
resize(width : Int32 | Nil = nil)
Source
running?
Source
state
Source
stop(message = "")
Source
stopped?
Source
tokens
Source
total
Source
update(current : Int64)
Source
update_tokens
Source
width
Source

Nested types