diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 22:50:10 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 22:50:10 -0300 |
commit | 3341d38641f860cfb32742bfeed00aa7ff264dad (patch) | |
tree | 177be13d0ebb2776200fe9320776670a50750e76 | |
parent | d5f84faebbd8c5aa8e451cf9a0547247812e57ee (diff) | |
download | highline-3341d38641f860cfb32742bfeed00aa7ff264dad.tar.gz |
Simplify uncolor with delegation
-rwxr-xr-x | lib/highline.rb | 9 |
1 files changed, 1 insertions, 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} |