Class: CocoapodsTools::Color
- Inherits:
-
Object
- Object
- CocoapodsTools::Color
- Defined in:
- lib/cocoapods-tools/helper/color.rb
Class Method Summary collapse
- .black ⇒ Object
- .blue ⇒ Object
- .color_text(text, color = Color.natural) ⇒ Object
- .cyan ⇒ Object
- .die_log(text) ⇒ Object
- .green ⇒ Object
- .magenta ⇒ Object
- .natural ⇒ Object
- .red ⇒ Object
- .white ⇒ Object
- .yellow ⇒ Object
Class Method Details
.black ⇒ Object
7 8 9 |
# File 'lib/cocoapods-tools/helper/color.rb', line 7 def self.black 30 end |
.blue ⇒ Object
23 24 25 |
# File 'lib/cocoapods-tools/helper/color.rb', line 23 def self.blue 34 end |
.color_text(text, color = Color.natural) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/cocoapods-tools/helper/color.rb', line 39 def self.color_text(text, color = Color.natural) if color == 0 return text end return "\033[#{color}m#{text}\033[0m" end |
.cyan ⇒ Object
31 32 33 |
# File 'lib/cocoapods-tools/helper/color.rb', line 31 def self.cyan 36 end |
.die_log(text) ⇒ Object
46 47 48 |
# File 'lib/cocoapods-tools/helper/color.rb', line 46 def self.die_log(text) puts color_text(text, Color.red) end |
.green ⇒ Object
15 16 17 |
# File 'lib/cocoapods-tools/helper/color.rb', line 15 def self.green 32 end |
.magenta ⇒ Object
27 28 29 |
# File 'lib/cocoapods-tools/helper/color.rb', line 27 def self.magenta 35 end |
.natural ⇒ Object
3 4 5 |
# File 'lib/cocoapods-tools/helper/color.rb', line 3 def self.natural 0 end |
.red ⇒ Object
11 12 13 |
# File 'lib/cocoapods-tools/helper/color.rb', line 11 def self.red 31 end |
.white ⇒ Object
35 36 37 |
# File 'lib/cocoapods-tools/helper/color.rb', line 35 def self.white 37 end |
.yellow ⇒ Object
19 20 21 |
# File 'lib/cocoapods-tools/helper/color.rb', line 19 def self.yellow 33 end |