Module: Kolorit::Linux
- Defined in:
- lib/kolorit/linux.rb
Overview
TODO:
Use ‘def red = kolor(int)` in ruby > 3.0
kolor codes for linux systems. Allow use of kolor methods when included in class.
Instance Method Summary collapse
- #blink ⇒ Object
- #blue ⇒ Object
- #bold ⇒ Object
-
#colorize(clr) ⇒ Object
this is part of code that make rubocop sad.
- #cyan ⇒ Object
- #gray ⇒ Object
- #green ⇒ Object
- #italic ⇒ Object
- #pink ⇒ Object
- #red ⇒ Object
- #reverse_color ⇒ Object (also: #inverse)
- #underline ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#blink ⇒ Object
53 54 55 |
# File 'lib/kolorit/linux.rb', line 53 def blink kolor(5) end |
#blue ⇒ Object
25 26 27 |
# File 'lib/kolorit/linux.rb', line 25 def blue kolor(34) end |
#bold ⇒ Object
41 42 43 |
# File 'lib/kolorit/linux.rb', line 41 def bold kolor(1) end |
#colorize(clr) ⇒ Object
this is part of code that make rubocop sad
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/kolorit/linux.rb', line 64 def colorize(clr) case clr.to_sym when :red then red when :green then green when :yellow then yellow when :blue then blue when :pink then pink when :cyan then cyan when :gray then gray when :bold then bold when :italic then italic when :underline then underline when :blink then blink when :reverse_color, :inverse then reverse_color else self end end |
#cyan ⇒ Object
33 34 35 |
# File 'lib/kolorit/linux.rb', line 33 def cyan kolor(36) end |
#gray ⇒ Object
37 38 39 |
# File 'lib/kolorit/linux.rb', line 37 def gray kolor(37) end |
#green ⇒ Object
17 18 19 |
# File 'lib/kolorit/linux.rb', line 17 def green kolor(32) end |
#italic ⇒ Object
45 46 47 |
# File 'lib/kolorit/linux.rb', line 45 def italic kolor(3) end |
#pink ⇒ Object
29 30 31 |
# File 'lib/kolorit/linux.rb', line 29 def pink kolor(35) end |
#red ⇒ Object
13 14 15 |
# File 'lib/kolorit/linux.rb', line 13 def red kolor(31) end |
#reverse_color ⇒ Object Also known as: inverse
57 58 59 |
# File 'lib/kolorit/linux.rb', line 57 def reverse_color kolor(7) end |
#underline ⇒ Object
49 50 51 |
# File 'lib/kolorit/linux.rb', line 49 def underline kolor(4) end |
#yellow ⇒ Object
21 22 23 |
# File 'lib/kolorit/linux.rb', line 21 def yellow kolor(33) end |