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.
Edit
git clone [email protected]:intridea/grape.git
cd grape
open lib/grape/dsl/inside_route.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Grape--DSL--InsideRoute-present-for-pr
# Commit to gitgit add lib/grape/dsl/inside_route.rbgit commit -m "better docs for Grape::DSL::InsideRoute#present"
# Open pull requestgem 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!