Term::Progress::Bar
Constants
DEFAULT_FORMAT = "[:bar] :percent :current/:total"
DEFAULT_WIDTH = 30
Constructors
Instance methods
complete_char
Sourcecurrent
Sourceenable_spinner(format : String | Symbol = :classic, frames : Array(String) | Nil = nil, interval : Int32 | Time::Span | Nil = nil)
Enable animated spinner token inside this bar.
- Include
:spinnerin the barformatstring to display. - Frames are sourced from Term::Spinner::FORMATS by name (default: :classic).
- You can also provide custom
frames:and/orinterval:.
Examples: bar = Term::Progress::Bar.new(format: ":spinner [:bar] :percent") bar.enable_spinner(:dots)
bar.enable_spinner(frames: ["-", "\", "|", "/"], interval: 100.milliseconds)
finish(message = "")
Sourcefinished?
Sourceformat
Sourcehead_char
Sourceincomplete_char
Sourcemeter
Sourceoutput
Sourceratio
Sourcereset
Sourcerunning?
Sourcestate
Sourcestop(message = "")
Sourcestopped?
Sourcetokens
Sourcetotal
Sourceupdate_tokens
Sourcewidth
Source