Module: Term::ANSIColor

Module | Term::ANSIColor
In: | lib/term/ansicolor.rb lib/term/ansicolor/version.rb

The ANSIColor module can be used for namespacing and mixed into your own classes.

### Methods

attributes coloring= coloring? uncolored

### Constants

COLORED_REGEXP | = | /\e\[([34][0-7]|[0-9])m/ |  | Regular expression that is used to scan for ANSI-sequences while uncoloring strings.
VERSION | = | '1.0.4' |  | Term::ANSIColor version

### Public Class methods

coloring=(val)

Turns the coloring on or off globally, so you can easily do this for example:

     Term::ANSIColor::coloring = STDOUT.isatty

coloring?()

Returns true, if the coloring function of this module is switched on, false otherwise.

### Public Instance methods

attributes()

Returns an array of all Term::ANSIColor attributes as symbols.

uncolored(string = nil) {|| ...}

Returns an uncolored version of the string, that is all ANSI-sequences are stripped from the string.

[Validate]