You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
how can i use interact mode in format beside :cue? #124
:cue is pretty good format, but the color of example is deep blue which is very uncomfortable to look. Is there any simple way to change this color or can i use this interact mode in other format?
BTW, I've found from stackoverflow and google, but got nothing so far, so that i put this little thing here.
Good question. That would be a good improvement to allow the colors to be customized. But there is no designed way to do that. Thankfully Ruby is dynamic, so you can override the method it uses. Try adding this to your test helper:
module Turn
module Colorize
def self.blue(string)
colorize? ? ::ANSI::Code.white{ string } : string
end
end
end
Notice I changed blue to white. You can choose any of your basic ANSI colors.
Activity
trans commentedon Sep 14, 2013
Good question. That would be a good improvement to allow the colors to be customized. But there is no designed way to do that. Thankfully Ruby is dynamic, so you can override the method it uses. Try adding this to your test helper:
Notice I changed
bluetowhite. You can choose any of your basic ANSI colors.elbbub commentedon Sep 15, 2013
Very useful hint, and it works.
Thanks