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
-
#error(*messages) ⇒ Object
red.
-
#info(*messages) ⇒ Object
blue.
-
#note(*messages) ⇒ Object
magenta.
-
#success(*messages) ⇒ Object
(also: #message)
green.
-
#warning(*messages) ⇒ Object
yellow.
Instance Method Details
#error(*messages) ⇒ Object
red
14 15 16 |
# File 'lib/pupu/cli.rb', line 14 def error(*) puts .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(*) puts .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(*) puts .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(*) puts .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(*) puts .map { |msg| "\033[1;33m#{msg}\033[0m" } end |