diff options
author | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:23:48 -0300 |
---|---|---|
committer | Abinoam P. Marques Jr <abinoam@gmail.com> | 2017-06-29 23:23:48 -0300 |
commit | cac18ffe5905853e469213f2d0f3cb5085659e99 (patch) | |
tree | 0ad42261e9d467070af152d753b22e55d2088f94 /lib/highline.rb | |
parent | ba3728ae742758efdbb43ca33603535aea9befa3 (diff) | |
download | highline-cac18ffe5905853e469213f2d0f3cb5085659e99.tar.gz |
Group accessors together
Diffstat (limited to 'lib/highline.rb')
-rwxr-xr-x | lib/highline.rb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/highline.rb b/lib/highline.rb index 6ee597f..a94bbed 100755 --- a/lib/highline.rb +++ b/lib/highline.rb @@ -86,27 +86,6 @@ class HighLine # The setting used to control color schemes. @color_scheme = nil - # Set it to false to disable ANSI coloring - attr_accessor :use_color - - # Returns truethy if HighLine instance is currently using color escapes. - def use_color? - !!use_color - end - - # Resets the use of color. - def reset_use_color - @use_color = true - 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 - end - # # Create an instance of HighLine connected to the given _input_ # and _output_ streams. @@ -139,6 +118,27 @@ class HighLine @terminal = HighLine::Terminal.get_terminal(input, output) end + # Set it to false to disable ANSI coloring + attr_accessor :use_color + + # Returns truethy if HighLine instance is currently using color escapes. + def use_color? + !!use_color + end + + # Resets the use of color. + def reset_use_color + @use_color = true + 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 + end + # @return [Integer] The current column setting for wrapping output. attr_reader :wrap_at |