Class: ShellSpinner::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/shell-spinner.rb

Instance Method Summary collapse

Constructor Details

#initializeRunner

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
  with_message text do
    with_spinner &block
  end
end