Module: Enumerable

Defined in:
lib/html/template.rb

Defined Under Namespace

Classes: LoopMeta

Instance Method Summary collapse

Instance Method Details

#each_with_loop(&blk) ⇒ Object



83
84
85
86
87
88
89
# File 'lib/html/template.rb', line 83

def each_with_loop( &blk )
  loop_meta = LoopMeta.new( size )
  each_with_index do |item, index|
     loop_meta.index = index
     blk.call( item, loop_meta )
  end
end