class Object
Constants
- COLOR_CODE
color code for colorful terminal output
Public Instance Methods
to_cmd()
click to toggle source
define to_cmd
for every object
# File lib/util.rb, line 3 def to_cmd if self.kind_of? Array return self.join ' ' else return self.to_s end end
to_color(color)
click to toggle source
define to_color
for terminal output
# File lib/util.rb, line 21 def to_color color "\x1b[#{COLOR_CODE[color]}m#{to_s}\x1b[m" end