Method: CommandLineInterface#color
- Defined in:
- lib/thartmx.rb
#color(s, t) ⇒ Object
184 185 186 187 188 189 190 191 192 193 |
# File 'lib/thartmx.rb', line 184 def color(s,t) p = case t[:task][0][:priority] when 'N' then printf("\e[0m%s\e[0m",s) when '1' then printf("\e[31;40m%s\e[0m",s) when '2' then printf("\e[33;40m%s\e[0m",s) when '3' then printf("\e[32;40m%s\e[0m",s) else puts "err" end end |