The ANSIColor module can be used for namespacing and mixed into your own classes.
Regular expression that is used to scan for ANSI-sequences while uncoloring strings.
Term::ANSIColor version
Returns an array of all Term::ANSIColor attributes as symbols.
# File lib/term/ansicolor.rb, line 97 def attributes ATTRIBUTE_NAMES end
Returns an uncolored version of the string, that is all ANSI-sequences are stripped from the string.
# File lib/term/ansicolor.rb, line 82 def uncolored(string = nil) # :yields: if block_given? yield.gsub(COLORED_REGEXP, '') elsif string string.gsub(COLORED_REGEXP, '') elsif respond_to?(:to_str) gsub(COLORED_REGEXP, '') else '' end end
Generated with the Darkfish Rdoc Generator 2.