class Rack::Logjam::ANSI
Public Class Methods
chart()
click to toggle source
# File lib/rack/logjam/ansi.rb, line 17 def self.chart { black: 30, red: 31, green: 32, yellow: 33, blue: 34, magenta: 35, cyan: 36, white: 37 } end
reset()
click to toggle source
# File lib/rack/logjam/ansi.rb, line 13 def self.reset "\e[0m" end
resolve_text( color, &block )
click to toggle source
# File lib/rack/logjam/ansi.rb, line 5 def self.resolve_text( color, &block ) text = nil if block_given? text = block.call + reset end "\e[#{chart[color.to_sym]}m#{text}" end