Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/banners.rb
Overview
open up string class, enable terminal colors add some colors, windowing methods
Instance Method Summary collapse
- #blu ⇒ Object
- #colorize(color, mod) ⇒ Object
- #grn ⇒ Object
- #red ⇒ Object
- #reset ⇒ Object
- #ugn ⇒ Object
- #yel ⇒ Object
Instance Method Details
#blu ⇒ Object
11 |
# File 'lib/banners.rb', line 11 def blu() colorize(34,0) end |
#colorize(color, mod) ⇒ Object
5 6 7 |
# File 'lib/banners.rb', line 5 def colorize(color, mod) "\033[#{mod};#{color};49m#{self}\033[0;0m" end |
#grn ⇒ Object
13 |
# File 'lib/banners.rb', line 13 def grn() colorize(32,0) end |
#red ⇒ Object
14 |
# File 'lib/banners.rb', line 14 def red() colorize(31,0) end |
#reset ⇒ Object
9 |
# File 'lib/banners.rb', line 9 def reset() colorize(0,0) end |
#ugn ⇒ Object
10 |
# File 'lib/banners.rb', line 10 def ugn() colorize(32,4) end |
#yel ⇒ Object
12 |
# File 'lib/banners.rb', line 12 def yel() colorize(33,0) end |