Module: PrettyBacon
- Defined in:
- lib/pretty_bacon.rb,
lib/pretty_bacon/version.rb
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.color(color, string) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pretty_bacon.rb', line 10 def self.color(color, string) case color when :red "\e[31m#{string}\e[0m" when :green "\e[32m#{string}\e[0m" when :yellow "\e[33m#{string}\e[0m" when :none string else "\e[0m#{string}\e[0m" end end |