elasticsearch-ruby
https://github.com/elastic/elasticsearch-ruby
Ruby
Ruby integrations for Elasticsearch
Opal::Compiler#returns
The last sexps in method bodies, for example, need to be returned in the compiled javascript. Due to syntax differences between javascript any ruby, some sexps need to be handled specially. For example, `if` statemented cannot be returned in javascript, so instead the "truthy" and "falsy" parts of the if statement both need to be returned instead. Sexps that need to be returned are passed to this method, and the alterned/new sexps are returned and should be used instead. Most sexps can just be added into a `s(:return) sexp`, so that is the default action if no special case is required.
Edit
git clone [email protected]:elastic/elasticsearch-ruby.git
cd elasticsearch-ruby
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Opal--Compiler-returns-for-pr
# Commit to gitgit add git commit -m "better docs for Opal::Compiler#returns"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Opal--Compiler-returns-for-pr
hub pull-request
# Celebrate!