Class: Wiris::XmlIterator

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

Instance Method Summary collapse

Constructor Details

#initialize(enum) ⇒ XmlIterator

Returns a new instance of XmlIterator.



183
184
185
# File 'lib/src-generic/Xml.rb', line 183

def initialize(enum)
    @enumeration = enum.map
end

Instance Method Details

#hasNextObject



191
192
193
194
195
196
197
198
# File 'lib/src-generic/Xml.rb', line 191

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

#nextObject



187
188
189
# File 'lib/src-generic/Xml.rb', line 187

def next
	Xml.new @enumeration.next
end