Module: Discotech
- Defined in:
- lib/discotech.rb,
lib/discotech/version.rb
Constant Summary collapse
- VERSION =
"0.0.4"
Class Method Summary collapse
- .black(string) ⇒ Object
- .blink(string) ⇒ Object
- .blue(string) ⇒ Object
- .bold(string) ⇒ Object
- .cyan(string) ⇒ Object
- .green(string) ⇒ Object
- .magenta(string) ⇒ Object
- .red(string) ⇒ Object
- .white(string) ⇒ Object
- .yellow(string) ⇒ Object
Class Method Details
.black(string) ⇒ Object
13 14 15 |
# File 'lib/discotech.rb', line 13 def self.black string "\e[30m" + string + "\e[39m" end |
.blink(string) ⇒ Object
5 6 7 |
# File 'lib/discotech.rb', line 5 def self.blink string "\e[5m" + string + "\e[25m" end |
.blue(string) ⇒ Object
29 30 31 |
# File 'lib/discotech.rb', line 29 def self.blue string "\e[34m" + string + "\e[39m" end |
.bold(string) ⇒ Object
9 10 11 |
# File 'lib/discotech.rb', line 9 def self.bold string "\e[1m" + string + "\e[22m" end |
.cyan(string) ⇒ Object
37 38 39 |
# File 'lib/discotech.rb', line 37 def self.cyan string "\e[36m" + string + "\e[39m" end |
.green(string) ⇒ Object
21 22 23 |
# File 'lib/discotech.rb', line 21 def self.green string "\e[32m" + string + "\e[39m" end |
.magenta(string) ⇒ Object
33 34 35 |
# File 'lib/discotech.rb', line 33 def self.magenta string "\e[35m" + string + "\e[39m" end |
.red(string) ⇒ Object
17 18 19 |
# File 'lib/discotech.rb', line 17 def self.red string "\e[31m" + string + "\e[39m" end |
.white(string) ⇒ Object
41 42 43 |
# File 'lib/discotech.rb', line 41 def self.white string "\e[37m" + string + "\e[39m" end |
.yellow(string) ⇒ Object
25 26 27 |
# File 'lib/discotech.rb', line 25 def self.yellow string "\e[33m" + string + "\e[39m" end |