From 3341d38641f860cfb32742bfeed00aa7ff264dad Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Thu, 29 Jun 2017 22:50:10 -0300 Subject: Simplify uncolor with delegation --- lib/highline.rb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/highline.rb b/lib/highline.rb index 09dd904..2fd93db 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -341,15 +341,8 @@ class HighLine # Remove color codes from a string. # @param string [String] to be decolorized # @return [String] without the ANSI escape sequence (colors) - def self.uncolor(string) - Style.uncolor(string) - end - - # (see .uncolor) - # Convenience instance method. It delegates to the class method. - def uncolor(string) - self.class.uncolor(string) + Style.uncolor(string) end # Renders a list of itens using a {ListRenderer} -- cgit v1.2.1