getbyte

ARGF.getbyte â Fixnum or nil
Instance Public methods

Gets the next 8-bit byte (0..255) from ARGF. Returns nil if called at the end of the stream.

For example:

$ echo "foo" > file
$ ruby argf.rb file

ARGF.getbyte #=> 102
ARGF.getbyte #=> 111
ARGF.getbyte #=> 111
ARGF.getbyte #=> 10
ARGF.getbyte #=> nil
doc_ruby_on_rails
2015-03-30 11:28:53
Comments
Leave a Comment

Please login to continue.