module Dev::UI::Spinner
Constants
- GLYPHS
- PERIOD
- TASK_FAILED
Public Class Methods
spin(title, auto_debrief: true, &block)
click to toggle source
Adds a single spinner Uses an interactive session to allow the user to pick an answer Can use arrows, y/n, numbers (1/2), and vim bindings to control
Attributes¶ ↑
-
title
- Title of the spinner to use
Options¶ ↑
-
:auto_debrief
- Automatically debrief exceptions? Default to true
Block¶ ↑
-
*spinner+ - Instance of the spinner. Can call
update_title
to update the user of changes
Example Usage:¶ ↑
Dev::UI::Spinner.spin('Title') { sleep 1.0 }
# File lib/dev/ui/spinner.rb, line 41 def self.spin(title, auto_debrief: true, &block) sg = SpinGroup.new(auto_debrief: auto_debrief) sg.add(title, &block) sg.wait end