class Opal::Prompt::Spinner

Overview

Animated terminal spinner running asynchronously on a background Fiber.

Defined in:

opal/prompt/spinner.cr

Constant Summary

FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(text : String, driver : Terminal::Driver | Nil = nil) #

[View source]

Class Method Detail

def self.start(text : String, driver : Terminal::Driver | Nil = nil, &block : Spinner -> T) : T forall T #

Runs a block with an active spinner, automatically stopping when complete.


[View source]

Instance Method Detail

def fail(msg : String | Nil = nil) : Nil #

[View source]
def start : Nil #

[View source]
def stop : Nil #

[View source]
def stopped? : Bool #

[View source]
def success(msg : String | Nil = nil) : Nil #

[View source]
def text : String #

[View source]
def text=(text : String) #

[View source]
def warn(msg : String | Nil = nil) : Nil #

[View source]