Module: Katagen::Generators::Logging
- Included in:
- Utils
- Defined in:
- lib/katagen/generators/logging.rb
Overview
Colorization for puts, no need for another gem TODO: should I move this into a small gem?
Constant Summary collapse
- COLOR_CODES =
{ red: 31, green: 32, yellow: 33, blue: 34, pink: 35, light_blue: 36 }
Instance Method Summary collapse
Instance Method Details
#info(message) ⇒ Object
15 16 17 |
# File 'lib/katagen/generators/logging.rb', line 15 def info() puts "#{colorize("info", :blue)} #{}" end |
#success(message) ⇒ Object
19 20 21 |
# File 'lib/katagen/generators/logging.rb', line 19 def success() puts "#{colorize("success", :green)} #{}" end |
#warning(message) ⇒ Object
23 24 25 |
# File 'lib/katagen/generators/logging.rb', line 23 def warning() puts "#{colorize("warning", :yellow)} #{}" end |