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


6
7
8
# File 'lib/aruba/colorizer.rb', line 6

def coloring
  @coloring
end

Instance Method Details

#cyan(string) ⇒ Object


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

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