Module: GodOfWar::Extensions::Core::String

Defined in:
lib/godofwar/extensions.rb

Instance Method Summary collapse

Instance Method Details

#blueObject



9
# File 'lib/godofwar/extensions.rb', line 9

def blue;         colorize(self, "\e[1m\e[34m");                  end

#boldObject



17
# File 'lib/godofwar/extensions.rb', line 17

def bold;         colorize(self, "\e[1m");                        end

#colorize(text, color_code) ⇒ Object



25
# File 'lib/godofwar/extensions.rb', line 25

def colorize(text, color_code) "#{color_code}#{text}\e[0m"        end

#cyanObject



13
# File 'lib/godofwar/extensions.rb', line 13

def cyan;         colorize(self, "\e[1;36m");                     end

#dark_blueObject



10
# File 'lib/godofwar/extensions.rb', line 10

def dark_blue;    colorize(self, "\e[34m");                       end

#dark_cyanObject



14
# File 'lib/godofwar/extensions.rb', line 14

def dark_cyan;    colorize(self, "\e[36m");                       end

#dark_greenObject



7
# File 'lib/godofwar/extensions.rb', line 7

def dark_green;   colorize(self, "\e[32m");                       end

#dark_purpleObject



12
# File 'lib/godofwar/extensions.rb', line 12

def dark_purple;  colorize(self, "\e[1;35m");                     end

#doneObject



24
# File 'lib/godofwar/extensions.rb', line 24

def done;         colorize(self, "[" + "".green + "] ");       end

#errorObject



19
# File 'lib/godofwar/extensions.rb', line 19

def error;        colorize(self, "[" + "".red + "] ");         end

#greenObject



6
# File 'lib/godofwar/extensions.rb', line 6

def green;        colorize(self, "\e[1m\e[32m");                  end

#pureObject



15
# File 'lib/godofwar/extensions.rb', line 15

def pure;         colorize(self, "\e[0m\e[28m");                  end

#purpleObject



11
# File 'lib/godofwar/extensions.rb', line 11

def purple;       colorize(self, "\e[35m");                       end

#redObject



5
# File 'lib/godofwar/extensions.rb', line 5

def red;          colorize(self, "\e[1m\e[31m");                  end

#step_failObject



23
# File 'lib/godofwar/extensions.rb', line 23

def step_fail;    colorize(self, "".dark_green);              end

#step_successObject



22
# File 'lib/godofwar/extensions.rb', line 22

def step_success; colorize(self, "".dark_green);              end

#successObject



21
# File 'lib/godofwar/extensions.rb', line 21

def success;      colorize(self, "[" + "".dark_green + "] ");  end

#tellObject



18
# File 'lib/godofwar/extensions.rb', line 18

def tell;         colorize(self, "[" + "" + "] ");             end

#underlineObject



16
# File 'lib/godofwar/extensions.rb', line 16

def underline;    colorize(self, "\e[4m");                        end

#warnObject



20
# File 'lib/godofwar/extensions.rb', line 20

def warn;         colorize(self, "[" + " ! ".bold.yellow + "] "); end

#yellowObject



8
# File 'lib/godofwar/extensions.rb', line 8

def yellow;       colorize(self, "\e[1m\e[33m");                  end