class Term::Spinner::Multi

Overview

Used for managing multiple terminal spinners

Included Modules

Defined in:

spinner/multi.cr

Constant Summary

DEFAULT_INSET = {top: "┌ ", middle: "├── ", bottom: "└── "}

Constructors

Instance Method Summary

Constructor Detail

def self.new(message = nil, style : NamedTuple(top: String, middle: String, bottom: String) = DEFAULT_INSET, **options) #

Initialize a multispinner

Example:

spinner = TTY::Spinner::Multi.new

[View source]

Instance Method Detail

def auto_spin #

Auto spin the top level spinner & all child spinners that have scheduled jobs


[View source]
def create_spinner(pattern_or_spinner, **options) #

Create a spinner instance


[View source]
def done? #

Check if all spinners are done


[View source]
def each(*args, **options) #

[View source]
def each(*args, **options, &) #

[View source]
def empty?(*args, **options) #

[View source]
def empty?(*args, **options, &) #

[View source]
def error #

Stop all spinners with error status


[View source]
def error? #

Check if any spinner errored


[View source]
def length(*args, **options) #

[View source]
def length(*args, **options, &) #

[View source]
def line_inset(line_no) #

Find the number of characters to move into the line before printing the spinner


[View source]
def next_row #

Increase a row count


[View source]
def on(key, &callback : Spinner -> ) #

Listen on event


[View source]
def pause #

Pause all spinners


[View source]
def register(pattern_or_spinner, observable = true, job = nil, **options) #

Register a new spinner


[View source]
def register(pattern_or_spinner, observable = true, **options, &job : Spinner -> ) #

ditto


[View source]
def resume #

Resume all spinners


[View source]
def rows : Int32 #

The current count of all rendered rows


[View source]
def spin #

Perform a single spin animation


[View source]
def stop #

Stop all spinners


[View source]
def success #

Stop all spinners with success status


[View source]
def success? #

Check if all spinners succeeded


[View source]
def synchronize(&) #

[View source]
def top_spinner #

Get the top level spinner if it exists


[View source]