Module: OverridesTracker::StringColorizer
- Defined in:
- lib/overrides_tracker/string_colorizer.rb
Instance Method Summary collapse
- #blue ⇒ Object
- #bold ⇒ Object
- #colorize(color_code) ⇒ Object
- #green ⇒ Object
- #italic ⇒ Object
- #light_blue ⇒ Object
- #pink ⇒ Object
- #red ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#blue ⇒ Object
18 19 20 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 18 def blue colorize(34) end |
#bold ⇒ Object
30 31 32 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 30 def bold "\e[1m#{self}\e[22m" end |
#colorize(color_code) ⇒ Object
2 3 4 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 2 def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end |
#green ⇒ Object
10 11 12 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 10 def green colorize(32) end |
#italic ⇒ Object
34 35 36 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 34 def italic "\e[3m#{self}\e[23m" end |
#light_blue ⇒ Object
26 27 28 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 26 def light_blue colorize(36) end |
#pink ⇒ Object
22 23 24 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 22 def pink colorize(35) end |
#red ⇒ Object
6 7 8 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 6 def red colorize(31) end |
#yellow ⇒ Object
14 15 16 |
# File 'lib/overrides_tracker/string_colorizer.rb', line 14 def yellow colorize(33) end |