Method: Kat::Colour#uncolour

Defined in:
lib/kat/colour.rb

#uncolourObject



30
31
32
33
34
35
36
# File 'lib/kat/colour.rb', line 30

def uncolour
  case self
  when String then gsub(/\e\[[0-9;]+?m(.*?)\e\[0m/, '\\1')
  when Array  then map { |e| e.uncolour if e }
  else self
  end
end