module Cucumber::Term::ANSIColor
def self.coloring=(val)
this for example:
Turns the coloring on or off globally, so you can easily do
def self.coloring=(val) @coloring = val end
def self.coloring?
Returns true, if the coloring function of this module
def self.coloring? @coloring end
def self.included(klass)
def self.included(klass) return unless klass == String ATTRIBUTES.delete(:clear) ATTRIBUTE_NAMES.delete(:clear) end
def attributes
def attributes ATTRIBUTE_NAMES end
def uncolored(string = nil)
Returns an uncolored version of the string, that is all
def uncolored(string = nil) if block_given? yield.gsub(COLORED_REGEXP, '') elsif string string.gsub(COLORED_REGEXP, '') elsif respond_to?(:to_str) to_str.gsub(COLORED_REGEXP, '') else '' end end