Created
November 11, 2009 16:56
-
-
Save fmiopensource/232106 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def putsc(text, color='y') | |
code = case color | |
when 'y' then 33 | |
when 'r' then 31 | |
when 'g' then 32 | |
end | |
printf "\033[#{code}m#{text}\033[0m\n\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment