class Hocon::Impl::ArrayIterator

Public Class Methods

new(a) click to toggle source
# File lib/hocon/impl/array_iterator.rb, line 5
def initialize(a)
  @a = a
  @index = 0
end

Public Instance Methods

has_next?() click to toggle source
# File lib/hocon/impl/array_iterator.rb, line 10
def has_next?
  @index < @a.length
end
next() click to toggle source
# File lib/hocon/impl/array_iterator.rb, line 14
def next
  @index += 1
  @a[@index - 1]
end