Class: ShellSpinner::Runner
- Inherits:
-
Object
- Object
- ShellSpinner::Runner
- Defined in:
- lib/shell-spinner.rb
Instance Method Summary collapse
-
#initialize ⇒ Runner
constructor
A new instance of Runner.
- #wrap_block(text = nil, &block) ⇒ Object
Constructor Details
#initialize ⇒ Runner
Returns a new instance of Runner.
6 7 8 9 |
# File 'lib/shell-spinner.rb', line 6 def initialize require 'stringio' @buffer, @original_output = StringIO.new, $stdout end |
Instance Method Details
#wrap_block(text = nil, &block) ⇒ Object
11 12 13 14 15 |
# File 'lib/shell-spinner.rb', line 11 def wrap_block text = nil, &block text do with_spinner &block end end |