sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
AST::Node#to_a
Returns {#children}. This is very useful in order to decompose nodes
concisely. For example:
node = s(:gasgn, :$foo, s(:integer, 1))
s
var_name, value = *node
p var_name # => :$foo
p value # => (integer 1)Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/ast-2.0.0/lib/ast/node.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-AST--Node-to_a-for-pr
# Commit to gitgit add app/server/ruby/vendor/ast-2.0.0/lib/ast/node.rbgit commit -m "better docs for AST::Node#to_a"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-AST--Node-to_a-for-pr
hub pull-request
# Celebrate!