Class: ActionView::CollectionRenderer::MixedCollectionIterator
- Inherits:
-
CollectionIterator
- Object
- CollectionIterator
- ActionView::CollectionRenderer::MixedCollectionIterator
- Defined in:
- lib/action_view/renderer/collection_renderer.rb
Overview
:nodoc:
Instance Method Summary collapse
- #each_with_info ⇒ Object
-
#initialize(collection, paths) ⇒ MixedCollectionIterator
constructor
A new instance of MixedCollectionIterator.
Methods inherited from CollectionIterator
#each, #length, #preload!, #size
Constructor Details
#initialize(collection, paths) ⇒ MixedCollectionIterator
Returns a new instance of MixedCollectionIterator.
101 102 103 104 |
# File 'lib/action_view/renderer/collection_renderer.rb', line 101 def initialize(collection, paths) super(collection) @paths = paths end |
Instance Method Details
#each_with_info ⇒ Object
106 107 108 109 |
# File 'lib/action_view/renderer/collection_renderer.rb', line 106 def each_with_info return enum_for(:each_with_info) unless block_given? @collection.each_with_index { |o, i| yield(o, @paths[i]) } end |