Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/avodeploy/core_ext/string_colors.rb

Overview

AVOCADO

The flexible and easy to use deployment framework for web applications

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License Version 2
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Instance Method Summary collapse

Instance Method Details

#cyanObject

Paints the string cyan on CLI



32
33
34
# File 'lib/avodeploy/core_ext/string_colors.rb', line 32

def cyan
  "\033[36m#{self}\033[0m"
end

#grayObject

Paints the string gray on CLI



42
43
44
# File 'lib/avodeploy/core_ext/string_colors.rb', line 42

def gray
  "\033[37m#{self}\033[0m"
end

#greenObject

Paints the string green on CLI



27
28
29
# File 'lib/avodeploy/core_ext/string_colors.rb', line 27

def green
  "\033[32m#{self}\033[0m"
end

#redObject

Paints the string red on CLI



22
23
24
# File 'lib/avodeploy/core_ext/string_colors.rb', line 22

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

#yellowObject

Paints the string yellow on CLI



37
38
39
# File 'lib/avodeploy/core_ext/string_colors.rb', line 37

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