Module: Super::Color

Included in:
String
Defined in:
lib/super/color.rb,
lib/super/color/version.rb

Constant Summary collapse

VERSION =
"0.1.3"

Instance Method Summary collapse

Instance Method Details

#greenObject Also known as: color_success



12
13
14
# File 'lib/super/color.rb', line 12

def green
  "\e[92m#{self}\e[0m"
end

#magentaObject



20
21
22
# File 'lib/super/color.rb', line 20

def magenta
  "\e[35m#{self}\e[0m"
end

#puts_errorObject



36
37
38
# File 'lib/super/color.rb', line 36

def puts_error
  puts red
end

#puts_successObject



32
33
34
# File 'lib/super/color.rb', line 32

def puts_success
  puts green
end

#puts_warningObject



28
29
30
# File 'lib/super/color.rb', line 28

def puts_warning
  puts yellow
end

#redObject Also known as: color_error



8
9
10
# File 'lib/super/color.rb', line 8

def red
  "\e[31m#{self}\e[0m"
end

#yellowObject Also known as: color_warning



16
17
18
# File 'lib/super/color.rb', line 16

def yellow
  "\e[93m#{self}\e[0m"
end