Class: String

Inherits:
Object show all
Defined in:
lib/amazing_print/core_ext/string.rb

Overview

frozen_string_literal: true

Instance Method Summary collapse

Instance Method Details

#uncolorObject

Remove ANSI color codes.



42
43
44
# File 'lib/amazing_print/core_ext/string.rb', line 42

def uncolor
  gsub(/\e\[[0-9;]*m/, '')
end