summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 23:12:09 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 23:14:34 -0300
commita8a884440bd5e3e3c7e8571a982821df4da49f4a (patch)
tree4499e3b23568ab2936c21a09978f6dff73164b85
parent65bb0ed0480160d79d0f102c7fdd0f62cbeb7d6e (diff)
downloadhighline-a8a884440bd5e3e3c7e8571a982821df4da49f4a.tar.gz
Use attr_accessor and the predicate version
-rwxr-xr-xlib/highline.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/highline.rb b/lib/highline.rb
index f07168b..46b2171 100755
--- a/lib/highline.rb
+++ b/lib/highline.rb
@@ -87,11 +87,11 @@ class HighLine
@color_scheme = nil
# Set it to false to disable ANSI coloring
- attr_writer :use_color
+ attr_accessor :use_color
- # Returns true if HighLine instance is currently using color escapes.
+ # Returns truethy if HighLine instance is currently using color escapes.
def use_color?
- @use_color
+ !!use_color
end
# Resets the use of color.