Class: Nanoc::Extra::Checking::Checks::ExternalLinks::ArrayEnumerator Private
- Inherits:
-
Object
- Object
- Nanoc::Extra::Checking::Checks::ExternalLinks::ArrayEnumerator
- 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
-
#initialize(array) ⇒ ArrayEnumerator
constructor
private
A new instance of ArrayEnumerator.
- #next ⇒ Object private
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
#next ⇒ Object
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 |