Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/devlog/utils.rb

Overview

Colors for devlog

Instance Method Summary collapse

Instance Method Details

#blueObject



7
# File 'lib/devlog/utils.rb', line 7

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

#colorize(text, color_code) ⇒ Object



10
# File 'lib/devlog/utils.rb', line 10

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

#dark_blueObject



8
# File 'lib/devlog/utils.rb', line 8

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

#dark_greenObject



5
# File 'lib/devlog/utils.rb', line 5

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

#greenObject



4
# File 'lib/devlog/utils.rb', line 4

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

#purObject



9
# File 'lib/devlog/utils.rb', line 9

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

#redObject



3
# File 'lib/devlog/utils.rb', line 3

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

#yellowObject



6
# File 'lib/devlog/utils.rb', line 6

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