Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/hawknee/colors.rb
Instance Method Summary collapse
-
#blink ⇒ Object
To be honest..
-
#bold ⇒ Object
Makes a string bold.
-
#colorize(symbol) ⇒ Object
Colorizes a string.
-
#hide ⇒ Object
Hides a string.
-
#reverse ⇒ Object
Reverses foreground and background colors.
-
#underline ⇒ Object
Underlines a string.
Instance Method Details
#blink ⇒ Object
To be honest.. Dunno what this does :D
71 72 73 74 |
# File 'lib/hawknee/colors.rb', line 71 def blink string = self "#{Hawknee::Effects[:blink]}#{string}#{Hawknee::Effects[:clear]}" end |
#bold ⇒ Object
Makes a string bold
47 48 49 50 |
# File 'lib/hawknee/colors.rb', line 47 def bold string = self "#{Hawknee::Effects[:bold]}#{string}#{Hawknee::Effects[:clear]}" end |
#colorize(symbol) ⇒ Object
Colorizes a string
41 42 43 44 |
# File 'lib/hawknee/colors.rb', line 41 def colorize(symbol) string = self "#{Hawknee::Colors[symbol.downcase.to_sym]}#{string}#{Hawknee::Effects[:clear]}" end |
#hide ⇒ Object
Hides a string
53 54 55 56 |
# File 'lib/hawknee/colors.rb', line 53 def hide string = self "#{Hawknee::Effects[:hide]}#{string}#{Hawknee::Effects[:clear]}" end |