require 'generator'
array = [7,8,9,10,11,12]
gen = Generator.new(array)
what = gen.current     #7
where = gen.index      #0   (same as pos)

while gen.end? and gen.current < 11
  gen.next
end

puts gen.current       # 11
puts gen.next          # 11
puts gen.index         # 4      (index same as pos)
puts gen.next?         # true   (next? same as end?)
puts gen.next          # 12
puts gen.next?         # false

