From c66300ef64f0fb22b819625d41e403a157f9c4d1 Mon Sep 17 00:00:00 2001 From: Abinoam Praxedes Marques Jr Date: Mon, 14 Dec 2015 08:10:29 -0300 Subject: Improve HighLine::Terminal and childs documentation --- lib/highline/terminal.rb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/highline/terminal.rb') diff --git a/lib/highline/terminal.rb b/lib/highline/terminal.rb index 77020f5..ac06b3b 100755 --- a/lib/highline/terminal.rb +++ b/lib/highline/terminal.rb @@ -55,16 +55,18 @@ class HighLine @output = output end - # An initialization callback to be overloaded by other classes. + # An initialization callback. # It is called by {.get_terminal}. def initialize_system_extensions end - # @return [Array] two value terminal size + # @return [Array] two value terminal + # size like [columns, lines] def terminal_size + [80, 24] end - # Enter Raw No Echo mode. To be overloaded by other classes. + # Enter Raw No Echo mode. def raw_no_echo_mode end @@ -82,6 +84,7 @@ class HighLine end # Get one character from the terminal + # @return [String] one character def get_character end @@ -150,6 +153,8 @@ class HighLine highline.input.gets end + # @!group Enviroment queries + # Running on JRuby? def jruby? defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' @@ -165,6 +170,8 @@ class HighLine defined?(RUBY_PLATFORM) && (RUBY_PLATFORM =~ /mswin|mingw|cygwin/) end + # @!endgroup + private # Yield a block using stty shell commands to preserve the terminal state. -- cgit v1.2.1