sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Rugged::Tree#each
Call +block+ with each of the entries of the subtree as a +Hash+. If no +block+
is given, an +enumerator+ is returned instead.
Note that only the entries in the root of the tree are yielded; if you need to
list also entries in subfolders, use +tree.walk+ instead.
tree.each { |entry| puts entry.inspect }
generates:
{:name => "foo.txt", :type => :blob, :oid => "d8786bfc97485e8d7b19b21fb88c8ef1f199fc3f", :filemode => 0}
{:name => "bar.txt", :type => :blob, :oid => "de5ba987198bcf2518885f0fc1350e5172cded78", :filemode => 0}
...Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_tree.c
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rugged--Tree-each-for-pr
# Commit to gitgit add app/server/ruby/vendor/rugged-1.7.1/ext/rugged/rugged_tree.cgit commit -m "better docs for Rugged::Tree#each"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rugged--Tree-each-for-pr
hub pull-request
# Celebrate!