Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i use interact mode in format beside :cue? #124

Open
elbbub opened this issue Sep 13, 2013 · 2 comments
Open

how can i use interact mode in format beside :cue? #124

elbbub opened this issue Sep 13, 2013 · 2 comments

Comments

@elbbub
Copy link

elbbub commented Sep 13, 2013

: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.

@trans
Copy link
Contributor

trans commented 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:

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.

@elbbub
Copy link
Author

elbbub commented Sep 15, 2013

Very useful hint, and it works.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants