class
Opal::Prompt::Spinner
- Opal::Prompt::Spinner
- Reference
- Object
Overview
Animated terminal spinner running asynchronously on a background Fiber.
Defined in:
opal/prompt/spinner.crConstant Summary
-
FRAMES =
["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
Constructors
Class Method Summary
-
.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.
Instance Method Summary
- #fail(msg : String | Nil = nil) : Nil
- #start : Nil
- #stop : Nil
- #stopped? : Bool
- #success(msg : String | Nil = nil) : Nil
- #text : String
- #text=(text : String)
- #warn(msg : String | Nil = nil) : Nil
Constructor Detail
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.