Module: SpinToWin
- Defined in:
- lib/spin_to_win.rb,
lib/spin_to_win/spinner.rb,
lib/spin_to_win/version.rb
Overview
Spinner
Defined Under Namespace
Classes: Spinner
Constant Summary collapse
- VERSION =
'0.1.1'.freeze
Class Method Summary collapse
- .banner(msg) ⇒ Object
- .complete! ⇒ Object
- .increment_done! ⇒ Object
- .increment_todo! ⇒ Object
- .output(msg) ⇒ Object
- .remove_banner(msg) ⇒ Object
- .with_spinner(title = nil, charset: :line, &blk) ⇒ Object
Class Method Details
.banner(msg) ⇒ Object
24 25 26 |
# File 'lib/spin_to_win.rb', line 24 def (msg) Celluloid::Notifications.notifier.publish('spinner_set_banner', msg) end |
.complete! ⇒ Object
16 17 18 |
# File 'lib/spin_to_win.rb', line 16 def complete! Celluloid::Notifications.notifier.publish('spinner_complete') end |
.increment_done! ⇒ Object
12 13 14 |
# File 'lib/spin_to_win.rb', line 12 def increment_done! Celluloid::Notifications.notifier.publish('spinner_increment_done') end |
.increment_todo! ⇒ Object
8 9 10 |
# File 'lib/spin_to_win.rb', line 8 def increment_todo! Celluloid::Notifications.notifier.publish('spinner_increment_todo') end |
.output(msg) ⇒ Object
20 21 22 |
# File 'lib/spin_to_win.rb', line 20 def output(msg) Celluloid::Notifications.notifier.publish('spinner_output', msg) end |
.remove_banner(msg) ⇒ Object
28 29 30 |
# File 'lib/spin_to_win.rb', line 28 def (msg) Celluloid::Notifications.notifier.publish('spinner_remove_banner', msg) end |
.with_spinner(title = nil, charset: :line, &blk) ⇒ Object
32 33 34 |
# File 'lib/spin_to_win.rb', line 32 def with_spinner(title = nil, charset: :line, &blk) SpinToWin::Spinner.with_spinner(title, charset: charset, &blk) end |