elasticsearch-ruby

https://github.com/elastic/elasticsearch-ruby

Ruby

Ruby integrations for Elasticsearch

Opal::Rewriters::Base#prepend_to_body

Prepends given +node+ to +body+ node.

Supports +body+ to be one of:
1. nil                     - empty body
2. s(:begin) / s(:kwbegin) - multiline body
3. s(:anything_else)       - singleline body

Returns a new body with +node+ injected as a first statement.

Source | Google | Stack overflow

Edit

git clone [email protected]:elastic/elasticsearch-ruby.git

cd elasticsearch-ruby

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Opal--Rewriters--Base-prepend_to_body-for-pr


# Commit to git

git add git commit -m "better docs for Opal::Rewriters::Base#prepend_to_body"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Opal--Rewriters--Base-prepend_to_body-for-pr

hub pull-request


# Celebrate!