Method: Alchemy::Shell#log
- Defined in:
- lib/alchemy/shell.rb
#log(message, type = nil) ⇒ Object
Prints out the given log message with the color due to its type
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/alchemy/shell.rb', line 84 def log(, type = nil) unless Alchemy::Shell.silenced? case type when :skip puts "#{color(:yellow)}== Skipping! #{}#{color(:clear)}" when :error puts "#{color(:red)}!! ERROR: #{}#{color(:clear)}" when :message puts "#{color(:clear)}#{}" else puts "#{color(:green)}== #{}#{color(:clear)}" end end end |