Class: Aruba::Colorizer

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

Overview

Simple colorizer class. Only supports the color cyan

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.coloringObject Also known as: coloring?

Returns the value of attribute coloring.



8
9
10
# File 'lib/aruba/colorizer.rb', line 8

def coloring
  @coloring
end

Instance Method Details

#cyan(string) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/aruba/colorizer.rb', line 13

def cyan(string)
  if self.class.coloring?
    "\e[36m#{string}\e[0m"
  else
    string
  end
end