sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Hamster.from

Create a Hamster immutable data structure with nested Hamster data
structure from a nested Ruby object `obj`.  This method recursively
"walks" the Ruby object, converting Ruby `Hash` to {Hamster::Hash}, Ruby
`Array` to {Hamster::Vector}, Ruby `Set` to {Hamster::Set}, and Ruby
`SortedSet` to {Hamster::SortedSet}.  Other objects are left as-is.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/hamster-3.0.0/lib/hamster/nested.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Hamster-from-for-pr


# Commit to git

git add app/server/ruby/vendor/hamster-3.0.0/lib/hamster/nested.rbgit commit -m "better docs for Hamster.from"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Hamster-from-for-pr

hub pull-request


# Celebrate!