elasticsearch-ruby
https://github.com/elastic/elasticsearch-ruby
Ruby
Ruby integrations for Elasticsearch
Matrix#each_with_index
Same as #each, but the row index and column index in addition to the element
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#{e} at #{row}, #{col}"
end
# => Prints:
# 1 at 0, 0
# 2 at 0, 1
# 3 at 1, 0
# 4 at 1, 1Edit
git clone [email protected]:elastic/elasticsearch-ruby.git
cd elasticsearch-ruby
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Matrix-each_with_index-for-pr
# Commit to gitgit add git commit -m "better docs for Matrix#each_with_index"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Matrix-each_with_index-for-pr
hub pull-request
# Celebrate!