Class: Overcommit::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/overcommit/logger.rb

Instance Method Summary collapse

Instance Method Details

#bold(str) ⇒ Object



16
17
18
# File 'lib/overcommit/logger.rb', line 16

def bold(str)
  log "\033[1;37m#{str}\033[0m"
end

#error(str) ⇒ Object



20
21
22
# File 'lib/overcommit/logger.rb', line 20

def error(str)
  log "\033[31m#{str}\033[0m"
end

#log(*args) ⇒ Object



12
13
14
# File 'lib/overcommit/logger.rb', line 12

def log(*args)
  puts *args
end

#notice(str) ⇒ Object



32
33
34
# File 'lib/overcommit/logger.rb', line 32

def notice(str)
  log "\033[1;33m#{str}\033[0m"
end

#partial(*args) ⇒ Object



8
9
10
# File 'lib/overcommit/logger.rb', line 8

def partial(*args)
  print *args
end

#success(str) ⇒ Object



24
25
26
# File 'lib/overcommit/logger.rb', line 24

def success(str)
  log "\033[32m#{str}\033[0m"
end

#warning(str) ⇒ Object



28
29
30
# File 'lib/overcommit/logger.rb', line 28

def warning(str)
  log "\033[33m#{str}\033[0m"
end