class Term::Spinner::Multi
- Term::Spinner::Multi
- Reference
- Object
Overview
Used for managing multiple terminal spinners
Included Modules
- Enumerable(Term::Spinner)
Defined in:
spinner/multi.crConstant Summary
-
DEFAULT_INSET =
{top: "┌ ", middle: "├── ", bottom: "└── "}
Constructors
-
.new(message = nil, style : NamedTuple(top: String, middle: String, bottom: String) = DEFAULT_INSET, **options)
Initialize a multispinner
Instance Method Summary
-
#auto_spin
Auto spin the top level spinner & all child spinners that have scheduled jobs
-
#create_spinner(pattern_or_spinner, **options)
Create a spinner instance
-
#done?
Check if all spinners are done
- #each(*args, **options)
- #each(*args, **options, &)
- #empty?(*args, **options)
- #empty?(*args, **options, &)
-
#error
Stop all spinners with error status
-
#error?
Check if any spinner errored
- #length(*args, **options)
- #length(*args, **options, &)
-
#line_inset(line_no)
Find the number of characters to move into the line before printing the spinner
-
#next_row
Increase a row count
-
#on(key, &callback : Spinner -> )
Listen on event
-
#pause
Pause all spinners
-
#register(pattern_or_spinner, observable = true, job = nil, **options)
Register a new spinner
-
#register(pattern_or_spinner, observable = true, **options, &job : Spinner -> )
ditto
-
#resume
Resume all spinners
-
#rows : Int32
The current count of all rendered rows
-
#spin
Perform a single spin animation
-
#stop
Stop all spinners
-
#success
Stop all spinners with success status
-
#success?
Check if all spinners succeeded
- #synchronize(&)
-
#top_spinner
Get the top level spinner if it exists
Constructor Detail
Initialize a multispinner
Example:
spinner = TTY::Spinner::Multi.new
Instance Method Detail
Find the number of characters to move into the line before printing the spinner
Register a new spinner
ditto