summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 22:50:10 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 22:50:10 -0300
commit3341d38641f860cfb32742bfeed00aa7ff264dad (patch)
tree177be13d0ebb2776200fe9320776670a50750e76
parentd5f84faebbd8c5aa8e451cf9a0547247812e57ee (diff)
downloadhighline-3341d38641f860cfb32742bfeed00aa7ff264dad.tar.gz
Simplify uncolor with delegation
-rwxr-xr-xlib/highline.rb9
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}