Class: Wiris::Iterator

Inherits:
Enumerator
  • Object
show all
Defined in:
lib/src-generic/Iterator.rb

Instance Method Summary collapse

Constructor Details

#initialize(enum) ⇒ Iterator

Returns a new instance of Iterator.



3
4
5
# File 'lib/src-generic/Iterator.rb', line 3

def initialize(enum)
    super(enum)
end

Instance Method Details

#enumeratornextObject



6
# File 'lib/src-generic/Iterator.rb', line 6

alias enumeratornext next

#hasNextObject



11
12
13
14
15
16
17
18
# File 'lib/src-generic/Iterator.rb', line 11

def hasNext()
    begin
        self.peek
        return true
    rescue StopIteration
        return false
    end
end

#nextObject



7
8
9
# File 'lib/src-generic/Iterator.rb', line 7

def next
    self.enumeratornext
end