Class: Tankobon::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/tankobon/cli.rb

Class Method Summary collapse

Class Method Details

.doneObject



16
17
18
19
20
21
22
23
# File 'lib/tankobon/cli.rb', line 16

def self.done()
  cr = "\r"
  clear = "\e[0K"
  reset = cr + clear
  
  print " Done.\n"
  $stdout.flush
end

.message(string) ⇒ Object



3
4
5
# File 'lib/tankobon/cli.rb', line 3

def self.message(string)
  puts string
end

.progress(progress) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/tankobon/cli.rb', line 7

def self.progress(progress)
  cr = "\r"
  clear = "\e[0K"
  reset = cr + clear
  print "#{reset}"
  print "#{progress}"
  $stdout.flush
end