diff options
author | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-12-14 08:10:29 -0300 |
---|---|---|
committer | Abinoam Praxedes Marques Jr <abinoam@gmail.com> | 2015-12-14 08:29:16 -0300 |
commit | c66300ef64f0fb22b819625d41e403a157f9c4d1 (patch) | |
tree | f4144645370841d5c092ffa5dccb386603b925f9 /lib/highline/terminal.rb | |
parent | da1cdee25d4cae9ec3f85ae131a5dfbc306ba97c (diff) | |
download | highline-c66300ef64f0fb22b819625d41e403a157f9c4d1.tar.gz |
Improve HighLine::Terminal and childs documentation
Diffstat (limited to 'lib/highline/terminal.rb')
-rwxr-xr-x | lib/highline/terminal.rb | 13 |
1 files changed, 10 insertions, 3 deletions
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<Integer, Integer>] 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. |