diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-07 01:49:40 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-07 01:49:40 +0000 |
commit | 12e7e79727527175572f74b144a331d288d620c2 (patch) | |
tree | fcdef6e5bc08dac73036634a8affae575d244ae6 /io.c | |
parent | 1b99ecc5a22e1665b75a56e12b3f831397fc4539 (diff) | |
download | ruby-12e7e79727527175572f74b144a331d288d620c2.tar.gz |
* io.c (Init_IO): Mention io/console methods. [Ruby 1.9 - Bug #5602]
* ext/io/console/console.c: Mention that io/console must be required
similar to lib/time.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -11097,6 +11097,35 @@ argf_write(VALUE argf, VALUE str) * command line (or STDIN if no files are mentioned). ARGF provides * the methods <code>#path</code> and <code>#filename</code> to access * the name of the file currently being read. + * + * == io/console + * + * The io/console extension provides methods for interacting with the + * console. The console can be accessed from <code>IO.console</code> or + * the standard input/output/error IO objects. + * + * Requiring io/console adds the following methods: + * + * * IO::console + * * IO#raw + * * IO#raw! + * * IO#cooked + * * IO#cooked! + * * IO#getch + * * IO#echo= + * * IO#echo? + * * IO#noecho + * * IO#winsize + * * IO#winsize= + * * IO#iflush + * * IO#ioflush + * * IO#oflush + * + * Example: + * + * require 'io/console' + * rows, columns = $stdin.winsize + * puts "You screen is #{columns} wide and #{rows} tall" */ void |