Class: Nanoc::Extra::Checking::Checks::ExternalLinks::ArrayEnumerator
- Inherits:
-
Object
- Object
- Nanoc::Extra::Checking::Checks::ExternalLinks::ArrayEnumerator
- Defined in:
- lib/nanoc/extra/checking/checks/external_links.rb
Instance Method Summary (collapse)
-
- (ArrayEnumerator) initialize(array)
constructor
A new instance of ArrayEnumerator.
-
- (Object) next
Constructor Details
- (ArrayEnumerator) initialize(array)
Returns a new instance of ArrayEnumerator
48 49 50 51 52 |
# File 'lib/nanoc/extra/checking/checks/external_links.rb', line 48 def initialize(array) @array = array @index = 0 @mutex = Mutex.new end |
Instance Method Details
- (Object) next
54 55 56 57 58 59 |
# File 'lib/nanoc/extra/checking/checks/external_links.rb', line 54 def next @mutex.synchronize do @index += 1 return @array[@index - 1] end end |