Class: String

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

Overview

fix: use css style

e.g. color( :red )
     color( :blue )
     background_color( :red )
     font_style( :bold )  -- why? why not??

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.use_colors=(value) ⇒ Object



30
31
32
# File 'lib/quik/colors.rb', line 30

def self.use_colors=(value)
  @@use_color = value
end

.use_colors?Boolean

Returns:

  • (Boolean)


24
25
26
27
28
# File 'lib/quik/colors.rb', line 24

def self.use_colors?
  @@use_color ||=  true
  ##  todo/fix: check for windows on load (set to false;otherwise true)
  @@use_color
end

Instance Method Details

#blueObject



38
# File 'lib/quik/colors.rb', line 38

def blue()     colorize(34); end

#boldObject

just use 0 clear for now; instead of BOLD_OFF (22) code; use bright as an alias??



42
# File 'lib/quik/colors.rb', line 42

def bold()     colorize(1); end

#cyanObject

light blue ??



40
# File 'lib/quik/colors.rb', line 40

def cyan()     colorize(36); end

#greenObject



36
# File 'lib/quik/colors.rb', line 36

def green()    colorize(32); end

#magentaObject

pink ??



39
# File 'lib/quik/colors.rb', line 39

def magenta()  colorize(35); end

#redObject



35
# File 'lib/quik/colors.rb', line 35

def red()      colorize(31); end

#yellowObject

note: more brown-ish (if not used w/ bold/bright mode) ??



37
# File 'lib/quik/colors.rb', line 37

def yellow()   colorize(33); end