lib/src-generic/Iterator.rb in wirispluginengine-3.62.0.1322 vs lib/src-generic/Iterator.rb in wirispluginengine-7.14.0.1422
- old
+ new
@@ -1,20 +1,21 @@
-module Wiris
- class Iterator < Enumerator
- def initialize(enum)
- super(enum)
- end
- alias enumeratornext next
- def next
- self.enumeratornext
- end
-
- def hasNext()
- begin
- self.peek
- return true
- rescue StopIteration
- return false
- end
- end
- end
+module Wiris
+ class Iterator < Enumerator
+ @enumeration
+ def initialize(enum)
+ @enumeration = enum.map
+ end
+
+ def next
+ @enumeration.next
+ end
+
+ def hasNext()
+ begin
+ @enumeration.peek
+ return true
+ rescue StopIteration
+ return false
+ end
+ end
+ end
end
\ No newline at end of file