Method: PuppetDB::Util.color
- Defined in:
- lib/puppetdb/util.rb
permalink .color(code) ⇒ Object
[View source]
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/puppetdb/util.rb', line 3 def self.color(code) colors = {:red => "[31m", :green => "[32m", :yellow => "[33m", :cyan => "[36m", :bold => "[1m", :reset => "[0m"} return colors[code] || "" end |