Module: Kernel

Defined in:
lib/pupu/cli.rb

Overview

copyied from merb.thor, this part is actually my code as well :)

Instance Method Summary collapse

Instance Method Details

#error(*messages) ⇒ Object

red



14
15
16
# File 'lib/pupu/cli.rb', line 14

def error(*messages)
  puts messages.map { |msg| "\033[1;31m#{msg}\033[0m" }
end

#info(*messages) ⇒ Object

blue



36
37
38
# File 'lib/pupu/cli.rb', line 36

def info(*messages)
  puts messages.map { |msg| "\033[1;34m#{msg}\033[0m" }
end

#note(*messages) ⇒ Object

magenta



31
32
33
# File 'lib/pupu/cli.rb', line 31

def note(*messages)
  puts messages.map { |msg| "\033[1;35m#{msg}\033[0m" }
end

#success(*messages) ⇒ Object Also known as: message

green



24
25
26
# File 'lib/pupu/cli.rb', line 24

def success(*messages)
  puts messages.map { |msg| "\033[1;32m#{msg}\033[0m" }
end

#warning(*messages) ⇒ Object

yellow



19
20
21
# File 'lib/pupu/cli.rb', line 19

def warning(*messages)
  puts messages.map { |msg| "\033[1;33m#{msg}\033[0m" }
end