From cac18ffe5905853e469213f2d0f3cb5085659e99 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Thu, 29 Jun 2017 23:23:48 -0300 Subject: Group accessors together --- lib/highline.rb | 42 +++++++++++++++++++++--------------------- 1 file 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 -- cgit v1.2.1