Method: Generator#current

Defined in:
lib/thread_generator.rb

#currentObject

Returns the element at the current position.

Raises:

  • (EOFError)


150
151
152
153
# File 'lib/thread_generator.rb', line 150

def current
  raise EOFError.new("no more elements available") if end?
  @queue.first
end