Class: Nanoc::Extra::Checking::Checks::ExternalLinks::ArrayEnumerator Private

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/extra/checking/checks/external_links.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ ArrayEnumerator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ArrayEnumerator.



44
45
46
47
48
# File 'lib/nanoc/extra/checking/checks/external_links.rb', line 44

def initialize(array)
  @array = array
  @index = 0
  @mutex = Mutex.new
end

Instance Method Details

#nextObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
53
54
55
# File 'lib/nanoc/extra/checking/checks/external_links.rb', line 50

def next
  @mutex.synchronize do
    @index += 1
    return @array[@index - 1]
  end
end