Module: Console

Defined in:
lib/teodoro/console.rb

Class Method Summary collapse

Class Method Details



2
3
4
5
6
7
8
9
10
# File 'lib/teodoro/console.rb', line 2

def self.print(string)
  Kernel.print "\r\e[2K#{string}"
  begin
    result = yield
  ensure
    Kernel.print "\r\e[2K"
  end
  result
end