each_char

ios.each_char {|c| block } â ios
ios.each_char â an_enumerator
Instance Public methods

Calls the given block once for each character in ios, passing the character as an argument. The stream must be opened for reading or an IOError will be raised.

If no block is given, an enumerator is returned instead.

f = File.new("testfile")
f.each_char {|c| print c, ' ' }   #=> #<File:testfile>
doc_ruby_on_rails
2015-04-13 10:58:48
Comments
Leave a Comment

Please login to continue.