Module: Kirchhoff::Logger
- Defined in:
- lib/kirchhoff/logger.rb
Constant Summary collapse
- ANSI_CODES =
{ :red => 31, :green => 32, :yellow => 33, :blue => 34, :gray => 90 }.freeze
Class Method Summary collapse
Class Method Details
.call(sym, text) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/kirchhoff/logger.rb', line 12 def call(sym, text) label = case sym when :info then blue("INFO") when :fail then red("FAIL") end puts "[#{label}] #{text}" end |