Class: Color

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

Constant Summary collapse

@@on =
Settings.new["colorize"]

Class Method Summary collapse

Class Method Details

.boldObject



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

def self.bold
  return Term::ANSIColor.bold if @@on
	"" if !@@on
end

.clearObject



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

def self.clear
  return Term::ANSIColor.clear if @@on
	"" if !@@on
end

.cyanObject



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

def self.cyan
  return Term::ANSIColor.cyan if @@on
	"" if !@@on
end

.greenObject



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

def self.green
  return Term::ANSIColor.green if @@on
	"" if !@@on
end

.whiteObject



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

def self.white
  return Term::ANSIColor.white if @@on
	"" if !@@on
end

.yellowObject



23
24
25
26
# File 'lib/color.rb', line 23

def self.yellow
  return Term::ANSIColor.yellow if @@on
	"" if !@@on
end