Module: Enumerable

Overview

Instance Method Summary collapse

Instance Method Details

#inject_with_index(injected) ⇒ Object



6
7
8
9
# File 'lib/opencv-ffi-wrappers/enumerable.rb', line 6

def inject_with_index(injected)
  each_with_index{ |obj, index| injected = yield(injected, obj, index) }
  injected
end