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
35 36 37 |
# File 'lib/github/extensions.rb', line 35 def self.color(color) "\e[#{COLORS[color.to_sym]}m" end |
.method_missing(color_name, *args) ⇒ Object
32 33 34 |
# File 'lib/github/extensions.rb', line 32 def self.method_missing(color_name, *args) color(color_name) + args.first + color(:clear) end |