module Corefines::String::Decolor
@!method decolor
@return [String] a copy of this string without ANSI escape codes (e.g. colors). @see Color#color
Public Instance Methods
decolor()
click to toggle source
# File lib/corefines/string.rb, line 181 def decolor scan(ESCAPE_SEQUENCE).reduce('') do |str, match| str << (match[3] || match[4]) end end