Module: Color
- Defined in:
- lib/github/extensions.rb
Overview
cute
Constant Summary collapse
- COLORS =
{ :clear => 0, :red => 31, :green => 32, :yellow => 33 }
Class Method Summary collapse
Class Method Details
.color(color) ⇒ Object
36 37 38 |
# File 'lib/github/extensions.rb', line 36 def self.color(color) "\e[#{COLORS[color.to_sym]}m" end |
.method_missing(color_name, *args) ⇒ Object
33 34 35 |
# File 'lib/github/extensions.rb', line 33 def self.method_missing(color_name, *args) color(color_name) + args.first + color(:clear) end |