Module: AddMapWithIndex

Defined in:
lib/opencv-ffi-wrappers/matcher.rb

Instance Method Summary collapse

Instance Method Details

#map_with_index(&blk) ⇒ Object



7
8
9
10
11
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 7

def map_with_index( &blk )
  a = []
  each_with_index { |k,i| a << blk.yield( k,i ) }
  a
end