grape

https://github.com/intridea/grape

Ruby

An opinionated framework for creating REST-like APIs in Ruby.

Grape::DSL::InsideRoute#present

Allows you to make use of Grape Entities by setting
the response body to the serializable hash of the
entity provided in the `:with` option. This has the
added benefit of automatically passing along environment
and version information to the serialization, making it
very easy to do conditional exposures. See Entity docs
for more info.

Source | Google | Stack overflow

Edit

git clone [email protected]:intridea/grape.git

cd grape

open lib/grape/dsl/inside_route.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Grape--DSL--InsideRoute-present-for-pr


# Commit to git

git add lib/grape/dsl/inside_route.rbgit commit -m "better docs for Grape::DSL::InsideRoute#present"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Grape--DSL--InsideRoute-present-for-pr

hub pull-request


# Celebrate!