grape
https://github.com/intridea/grape
Ruby
An opinionated framework for creating REST-like APIs in Ruby.
Grape::Endpoint.generate_api_method
Create an UnboundMethod that is appropriate for executing an endpoint route. The unbound method allows explicit calls to +return+ without raising a +LocalJumpError+. The method will be removed, but a +Proc+ reference to it will be returned. The returned +Proc+ expects a single argument: the instance of +Endpoint+ to bind to the method during the call.
Edit
git clone [email protected]:intridea/grape.git
cd grape
open lib/grape/endpoint.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Grape--Endpoint-generate_api_method-for-pr
# Commit to gitgit add lib/grape/endpoint.rbgit commit -m "better docs for Grape::Endpoint.generate_api_method"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Grape--Endpoint-generate_api_method-for-pr
hub pull-request
# Celebrate!