Module: Merb::ColorfulMessages

Included in:
Generators::Generator
Defined in:
lib/merb-gen/generator.rb

Instance Method Summary collapse

Instance Method Details

#error(*messages) ⇒ Object

red


5
6
7
# File 'lib/merb-gen/generator.rb', line 5

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

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

green


13
14
15
# File 'lib/merb-gen/generator.rb', line 13

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

#warning(*messages) ⇒ Object

yellow


9
10
11
# File 'lib/merb-gen/generator.rb', line 9

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