summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 23:21:22 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-06-29 23:22:25 -0300
commitba3728ae742758efdbb43ca33603535aea9befa3 (patch)
treec17352d0a12beb58ba9a054b61c67615e542cddf
parenta8a884440bd5e3e3c7e8571a982821df4da49f4a (diff)
downloadhighline-ba3728ae742758efdbb43ca33603535aea9befa3.tar.gz
Use attr_accessor for track_eof
-rwxr-xr-xlib/highline.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/highline.rb b/lib/highline.rb
index 46b2171..6ee597f 100755
--- a/lib/highline.rb
+++ b/lib/highline.rb
@@ -99,14 +99,12 @@ class HighLine
@use_color = true
end
- # Pass +false+ to _setting_ to turn off HighLine's EOF tracking.
- def track_eof=(setting)
- @track_eof = setting
- end
+ # Pass +false+ to turn off HighLine's EOF tracking.
+ attr_accessor :track_eof
# Returns true if HighLine is currently tracking EOF for input.
def track_eof?
- @track_eof
+ !!track_eof
end
#