Module: RedGreen
- Included in:
- Update
- Defined in:
- lib/update/red-green.rb
Instance Method Summary collapse
Instance Method Details
#green(text) ⇒ Object
6 7 8 |
# File 'lib/update/red-green.rb', line 6 def green text say "tput setaf 2", text end |
#red(text) ⇒ Object
2 3 4 |
# File 'lib/update/red-green.rb', line 2 def red text say "tput setaf 1", text end |
#say(color, text) ⇒ Object
10 11 12 13 14 |
# File 'lib/update/red-green.rb', line 10 def say color, text system color puts text system "tput sgr0" #default color end |