Method: ObjectStream#each

Defined in:
lib/object-stream.rb

#eachObject

Iterate through the (rest of) the stream of objects. Does not raise EOFError, but simply returns. All Enumerable and Enumerator methods are available.



161
162
163
164
165
# File 'lib/object-stream.rb', line 161

def each
  return to_enum unless block_given?
  read {|obj| yield obj} until eof
rescue EOFError
end